JunRuiLee commented on code in PR #10541:
URL: https://github.com/apache/paimon/pull/10541#discussion_r4258592515
##########
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:
Could we reject commit_mode='actor' with commit.native.enabled=true when
actor mode is initialized, rather than only warning here? Native commit
bypasses the dedup scan, so an ordinary actor/task retry can publish the same
task twice. Implementing native dedup can stay out of scope, but this
combination should fail fast before any commits.
--
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]