Skip to content

Enhance: RewriteAction conflict detection and resolution #21

@Li0k

Description

@Li0k

Backgroud

During the compaction process, the iceberg table may have added a new snapshot, and the submission will cause a conflict.

  1. Other snapshots (non-replace) have been written during the compaction period, so the compaction result has no actual conflict with the latest snapshot and can be reapplied

  2. Other replace operations have been written during the compaction period, and the compaction input no longer exists. At this time, it is necessary to detect the conflict and abandon the compaction result to avoid data errors.

Solution

  1. For situation 1, add a retry operation to commit. When the transaction fails to commit, re-obtain the latest table snapshot and re-execute the action apply.

  2. For situation 2

  • SDK prohibits the removal of non-existent files.

  • Add conflict detection before committing to reduce commit counts.

Metadata

Metadata

Assignees

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