JingsongLi commented on code in PR #1525:
URL: https://github.com/apache/paimon-rust/pull/1525#discussion_r4678442678
##########
crates/paimon/src/table/table_commit.rs:
##########
@@ -1378,13 +1383,15 @@ impl TableCommit {
mut resolved: ResolvedCommit,
latest_snapshot: &Option<Snapshot>,
commit_identifier: i64,
+ partition_overwrite: bool,
) -> Result<CommitAttemptResult> {
let mut created_files = Vec::new();
let prepared = self
.prepare_snapshot(
&mut resolved,
latest_snapshot,
commit_identifier,
+ partition_overwrite,
Review Comment:
**[P2] Reclaim replacement files after a definite snapshot conflict**
This overwrite can now write a fresh data run and PK indexes inside each
publication attempt. If another writer wins the snapshot CAS, `commit` returns
`Ok(false)` and the cleanup only handles `COMPACT` DV containers. I forced a
competing append between snapshot preparation and publication for an overwrite
with two overlapping L0 files. The retry succeeded, and the Parquet file
generated for the rejected attempt remained in the bucket. A contended
overwrite can leave a full replacement run and its indexes per retry until
orphan cleanup. Track these attempt-owned outputs and remove them on a definite
conflict. Keep the staged inputs for the retry and preserve outputs when
publication returns an ambiguous error.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]