fresh-borzoni commented on code in PR #404:
URL: https://github.com/apache/fluss-rust/pull/404#discussion_r2936071211


##########
crates/fluss/src/client/write/sender.rs:
##########
@@ -467,6 +653,39 @@ impl Sender {
                 physical_table_path.as_ref(),
                 ready_write_batch.table_bucket.bucket_id()
             );
+
+            // If idempotence is enabled, only retry if the current writer ID 
still matches
+            // the batch's writer ID. If the writer ID was reset (e.g., by 
another bucket's
+            // error), fail the batch instead of retrying with stale state.
+            if self.idempotence_manager.is_enabled() {
+                let batch_writer_id = 
ready_write_batch.write_batch.writer_id();
+                if batch_writer_id != NO_WRITER_ID

Review Comment:
   I thin java client does this check, at least 
https://github.com/apache/fluss/blob/96aee597e685879968a271578b80daa12ab4d6f6/fluss-client/src/main/java/org/apache/fluss/client/write/IdempotenceManager.java#L89
   it's comparing current writer id with batch's writer id



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