discivigour commented on code in PR #7323:
URL: https://github.com/apache/paimon/pull/7323#discussion_r2877102464


##########
paimon-python/pypaimon/write/file_store_commit.py:
##########
@@ -93,11 +97,30 @@ def __init__(self, snapshot_commit: SnapshotCommit, table, 
commit_user: str):
         self.commit_min_retry_wait = table.options.commit_min_retry_wait()
         self.commit_max_retry_wait = table.options.commit_max_retry_wait()
 
+        self.commit_scanner = CommitScanner(table, self.manifest_list_manager)
+
+        self.conflict_detection = ConflictDetection(
+            data_evolution_enabled=table.options.data_evolution_enabled(),
+            snapshot_manager=self.snapshot_manager,
+            manifest_list_manager=self.manifest_list_manager,
+            table=table,
+            commit_scanner=self.commit_scanner
+        )
+
+        table_rollback = table.catalog_environment.catalog_table_rollback()
+        self.rollback = CommitRollback(table_rollback) if table_rollback is 
not None else None
+
     def commit(self, commit_messages: List[CommitMessage], commit_identifier: 
int):
         """Commit the given commit messages in normal append mode."""
         if not commit_messages:
             return
 
+        # Extract snapshot_for_update from commit messages
+        for msg in commit_messages:
+            if msg.snapshot_for_update != -1:
+                self.conflict_detection._row_id_check_from_snapshot = 
msg.snapshot_for_update

Review Comment:
   ok.



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