You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "platinumhamburg (via GitHub)" <gi...@apache.org> on 2026/09/07 06:44:14 UTC

[I] [rust] Stale out-of-order responses can incorrectly reset the idempotent writer [fluss]

platinumhamburg opened a new issue, #4238:
URL: https://github.com/apache/fluss/issues/4238

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/fluss/issues) and found nothing similar.
   
   
   ### Fluss version
   
   0.9.0 (latest release)
   
   ### Please describe the bug 🐞
   
   The Rust idempotent writer can treat a stale `OutOfOrderSequenceException` as a fatal failure even when a predecessor has been acknowledged since the affected batch was sent. This can fail the batch and reset the writer ID instead of retrying it against the advanced server state.
   
   In [can_retry_for_error](https://github.com/apache/fluss/blob/44e1cdd225c9f31ec26d62f25be0468f2cd89187/fluss-rust/crates/fluss/src/client/write/idempotence.rs#L340), the Rust decision is:
   
   ```rust
   if error == FlussError::OutOfOrderSequenceException {
       let is_next = entry.map_or(batch_sequence == 0, |e| {
           e.last_acked_sequence + 1 == batch_sequence
       });
       return is_reset || !is_next;
   }
   ```
   
   Java additionally retries when the current last acknowledged sequence is greater than the batch's send-time snapshot:
   
   ```java
   lastAckedBatchSequence(tableBucket)
           .orElse(IdempotenceBucketEntry.NO_LAST_ACKED_BATCH_SEQUENCE)
       > batch.lastAckedSequenceAtSend()
   ```
   
   PR #4125 added that snapshot and refreshes it on each send attempt. The Rust implementation has no equivalent send-time state or condition.
   
   ### Solution
   
   Port the send-time acknowledged-sequence snapshot and retry condition from #4125. Refresh the snapshot for every attempt, including retries, and add Rust Sender-level coverage for the three cases above.
   
   This report does not claim that the missing condition causes infinite retries. Delivery deadlines and whether `flush()` should retain previously completed failures are separate concerns.
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
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: issues-unsubscribe@fluss.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [rust] Stale out-of-order responses can incorrectly reset the idempotent writer [fluss]

Posted by "wuchong (via GitHub)" <gi...@apache.org>.
wuchong closed issue #4238: [rust] Stale out-of-order responses can incorrectly reset the idempotent writer
URL: https://github.com/apache/fluss/issues/4238


-- 
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: issues-unsubscribe@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org