JingsongLi commented on code in PR #1417:
URL: https://github.com/apache/paimon-rust/pull/1417#discussion_r4601782687


##########
crates/paimon/src/table/table_commit.rs:
##########
@@ -1423,16 +1423,37 @@ impl TableCommit {
         // Once publication starts its outcome may be unknown. These files must
         // remain available even if the response is lost or a later retry 
fails.
         let base_snapshot_uuid = 
latest_snapshot.as_ref().and_then(Snapshot::uuid);
-        let publication_error = match self
+        let publication = self
             .snapshot_commit
             .commit(
                 base_snapshot_uuid,
                 &snapshot,
                 self.table.branch(),
                 &statistics,
             )
-            .await
-        {
+            .await;
+        // Storage may replay a successful conditional write after losing its
+        // response. Establish ownership before treating false as a rejection.
+        let publication = match publication {
+            Ok(false) => match 
self.snapshot_manager.get_snapshot_uncached(snapshot.id()).await {

Review Comment:
   Revalidated 50543fee. Requirement fit: SUPPORTED. Implementation: CLEAN at 
this head; no remaining actionable code finding in this review.
   
   The final provider boundary addresses the reported catalog-only REST cleanup 
case under the REST API's rejection contract, while retaining ownership 
verification and shared-cache invalidation for file publication. Java's 
RenamingSnapshotCommit resolves ambiguous storage outcomes before exposing its 
boolean. I did not establish a supported server/backend trigger making the 
latest REST shortcut an introduced client regression; the synthetic 
storage-forwarding-server case is not a blocker here.
   
   Rust 1.98.0: all 219 commit tests, the OSS conditional-write replay test, 
all 172 REST integration tests and all 6 recovery integration tests pass (398). 
The intermediate fb4c79eb snapshot-ID cache regression was independently 
reproduced (fresh/latest reads exclude the rolled-back row, pinned read 
includes it; identical probe passes on 3f98dd7d); that REST early-return path 
is removed in this revision. Submitted format/diff checks pass and merge-tree 
with main efbae37a is clean.
   
   Latest-head CI is still queued. This is a completed local review, not 
production approval.



-- 
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]

Reply via email to