hameizi commented on code in PR #10541:
URL: https://github.com/apache/paimon/pull/10541#discussion_r4269062213


##########
paimon-python/pypaimon/write/table_commit.py:
##########
@@ -56,7 +58,21 @@ def __init__(self, table, commit_user: str, 
static_partition: Optional[dict]):
         self._native_callbacks_registered = False
         self.file_store_commit = FileStoreCommit(
             snapshot_commit, table, commit_user,
-            commit_callbacks=self._commit_callbacks)
+            commit_callbacks=self._commit_callbacks, dedup=dedup)
+        if (dedup is not None and dedup.on_first_attempt
+                and table.options.native_commit_enabled()):
+            # The native committer has no duplicate-commit scan, and _commit
+            # returns as soon as it publishes, so the Python dedup below is
+            # never reached. A caller only asks for first-attempt dedup because
+            # it may re-issue this commit with the same commit_user, and on the
+            # native path that re-issue commits the files a second time.
+            logger.warning(

Review Comment:
   Fixed by rejecting this combination rather than leaving it as a warning or 
silently falling back. Both the datasink and committer actor reject effective 
commit.native.enabled=true during initialization, before native publication can 
occur.
     This also covers the actor fast path that legitimately skips first-attempt 
dedup.
   
     TableCommit additionally rejects native commit when first-attempt dedup is 
requested, as defense in depth. Regression tests cover table-level 
configuration, dynamic overrides, direct actor construction, and the 
TableCommit guard. Native
     commits without the dedup requirement remain unchanged.



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