PragmaTwice commented on issue #3070:
URL: https://github.com/apache/kvrocks/issues/3070#issuecomment-3101432666

   I'm not familiar to the code of replication part, but I can try to propose a 
solution for this problem.
   
   Introducing two configuration options:
   ```
   replication_ack_duration (in milliseconds/seconds?)
   replication_ack_seq_threshold
   ```
   
   Algorithm:
   - In `IncrementBatchLoop`
     - if `current_seq - last_reported_seq > replication_ack_seq_threshold`:
       - ACK `current_seq`
       - update `last_reported_seq`
   - In the ack timer (triggered in every `replication_ack_duration`)
     - if `last_reported_seq != current_seq`:
       - ACK `current_seq`
       - update `last_reported_seq`
   
   Remaining problems:
   - How to tune these two values? (performance v.s. `WAIT` latency)
   - Should we combine it with active fetching (`GETACK`)?
   - How is the current behavior? e.g. how many `ACK` is sent in 1s?


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