icechunk.conflicts#
Conflict detection and resolution for concurrent writes.
icechunk.conflicts #
Classes:
| Name | Description |
|---|---|
BasicConflictSolver | A basic conflict solver that allows for simple configuration of resolution behavior |
Conflict | A conflict detected between snapshots |
ConflictDetector | A conflict solver that can be used to detect conflicts between two stores, but does not resolve them |
ConflictSolver | An abstract conflict solver that can be used to detect or resolve conflicts between two stores |
ConflictType | Type of conflict detected |
VersionSelection | Enum for selecting the which version of a conflict |
BasicConflictSolver #
Bases: ConflictSolver
A basic conflict solver that allows for simple configuration of resolution behavior
This conflict solver allows for simple configuration of resolution behavior for conflicts that may occur during a rebase operation. It will attempt to resolve a limited set of conflicts based on the configuration options provided.
- When a chunk conflict is encountered, the behavior is determined by the
on_chunk_conflictoption - When an array is deleted that has been updated,
fail_on_delete_of_updated_arraywill determine whether to fail the rebase operation - When a group is deleted that has been updated,
fail_on_delete_of_updated_groupwill determine whether to fail the rebase operation
Methods:
| Name | Description |
|---|---|
__new__ | Create a BasicConflictSolver object with the given configuration options |
Source code in icechunk-python/python/icechunk/_icechunk_python.pyi
__new__ #
__new__(
*,
on_chunk_conflict=VersionSelection.UseOurs,
fail_on_delete_of_updated_array=False,
fail_on_delete_of_updated_group=False,
)
Create a BasicConflictSolver object with the given configuration options
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
on_chunk_conflict | VersionSelection | The behavior to use when a chunk conflict is encountered, by default VersionSelection.use_theirs() | UseOurs |
fail_on_delete_of_updated_array | bool | Whether to fail when a chunk is deleted that has been updated, by default False | False |
fail_on_delete_of_updated_group | bool | Whether to fail when a group is deleted that has been updated, by default False | False |
Source code in icechunk-python/python/icechunk/_icechunk_python.pyi
Conflict #
A conflict detected between snapshots
Methods:
| Name | Description |
|---|---|
__new__ | Create a new Conflict. |
Attributes:
| Name | Type | Description |
|---|---|---|
conflict_type | ConflictType | The type of conflict detected |
conflicted_chunks | list[list[int]] | None | If the conflict is a chunk conflict, this will return the list of chunk indices that are in conflict |
path | str | The path of the node that caused the conflict |
Source code in icechunk-python/python/icechunk/_icechunk_python.pyi
conflict_type property #
The type of conflict detected
Returns: ConflictType: The type of conflict detected
conflicted_chunks property #
If the conflict is a chunk conflict, this will return the list of chunk indices that are in conflict
Returns: list[list[int]] | None: The list of chunk indices that are in conflict
path property #
The path of the node that caused the conflict
Returns: str: The path of the node that caused the conflict
__new__ #
Create a new Conflict.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
conflict_type | ConflictType | The type of conflict. | required |
path | str | The path of the node that caused the conflict. | required |
conflicted_chunks | list[list[int]] | None | If the conflict is a chunk conflict, the list of chunk indices in conflict. | None |
Source code in icechunk-python/python/icechunk/_icechunk_python.pyi
ConflictDetector #
Bases: ConflictSolver
A conflict solver that can be used to detect conflicts between two stores, but does not resolve them
Where the BasicConflictSolver will attempt to resolve conflicts, the ConflictDetector will only detect them. This means that during a rebase operation the ConflictDetector will raise a RebaseFailed error if any conflicts are detected, and allow the rebase operation to be retried with a different conflict resolution strategy. Otherwise, if no conflicts are detected the rebase operation will succeed.
Source code in icechunk-python/python/icechunk/_icechunk_python.pyi
ConflictSolver #
An abstract conflict solver that can be used to detect or resolve conflicts between two stores
This should never be used directly, but should be subclassed to provide specific conflict resolution behavior
Source code in icechunk-python/python/icechunk/_icechunk_python.pyi
ConflictType #
Bases: Enum
Type of conflict detected
Attributes:
| Name | Type | Description |
|---|---|---|
ChunkDoubleUpdate | A chunk update conflicts with an existing chunk update | |
ChunksUpdatedInDeletedArray | Chunks are updated in a deleted array | |
ChunksUpdatedInUpdatedArray | Chunks are updated in an updated array | |
DeleteOfUpdatedArray | A delete is attempted on an updated array | |
DeleteOfUpdatedGroup | A delete is attempted on an updated group | |
NewNodeConflictsWithExistingNode | A new node conflicts with an existing node | |
NewNodeInInvalidGroup | A new node is in an invalid group | |
ZarrMetadataDoubleUpdate | A zarr metadata update conflicts with an existing zarr metadata update | |
ZarrMetadataUpdateOfDeletedArray | A zarr metadata update is attempted on a deleted array | |
ZarrMetadataUpdateOfDeletedGroup | A zarr metadata update is attempted on a deleted group |
Source code in icechunk-python/python/icechunk/_icechunk_python.pyi
ChunkDoubleUpdate class-attribute instance-attribute #
A chunk update conflicts with an existing chunk update
ChunksUpdatedInDeletedArray class-attribute instance-attribute #
Chunks are updated in a deleted array
ChunksUpdatedInUpdatedArray class-attribute instance-attribute #
Chunks are updated in an updated array
DeleteOfUpdatedArray class-attribute instance-attribute #
A delete is attempted on an updated array
DeleteOfUpdatedGroup class-attribute instance-attribute #
A delete is attempted on an updated group
NewNodeConflictsWithExistingNode class-attribute instance-attribute #
A new node conflicts with an existing node
NewNodeInInvalidGroup class-attribute instance-attribute #
A new node is in an invalid group
ZarrMetadataDoubleUpdate class-attribute instance-attribute #
A zarr metadata update conflicts with an existing zarr metadata update
ZarrMetadataUpdateOfDeletedArray class-attribute instance-attribute #
A zarr metadata update is attempted on a deleted array
ZarrMetadataUpdateOfDeletedGroup class-attribute instance-attribute #
A zarr metadata update is attempted on a deleted group
VersionSelection #
Bases: Enum
Enum for selecting the which version of a conflict
Attributes:
| Name | Type | Description |
|---|---|---|
Fail | int | Fail the rebase operation |
UseOurs | int | Use the version from the source store |
UseTheirs | int | Use the version from the target store |