Skip to content

Using Iterable with @retry leads to silent data corruption #363

@Zaczero

Description

@Zaczero

@retry is fundamentally incompatible with the Iterable concept.

For example here:

items: Iterable[Dict[str, Any]],

load_partition accepts input from itertools.groupby:

for k, g in itertools.groupby(chunk, lambda x: x["partition"]):
self.load_partition(self._partition_cache[k], g, insert_mode)

That is Iterable and after first retry will contain empty data, discarding all input.

More about groupby in the Python documentation:

https://docs.python.org/3/library/itertools.html#itertools.groupby

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions