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

   Thanks for clarification. In this case, fundamentally our approaches are the 
same. The only difference is in your approach you are checking if ack should be 
sent only at the end of `IncrementBatchLoop`, and in my approach I may send an 
ack in the mid of `IncrementBatchLoop` call after a DB write happens. My 
usecase is a bit extreme, I will need to call WAIT for evey wrie calls, so 
calling ack on each write can make sense in my usecase. I will do some 
benchmark and see if it really makes sense.
   
   Otherwise we can do a combination of our approaches:
   ```
   // if replication_ack_seq_buffer = 1, this value can be unset (-1)
   // otherwise this value must be set
   replication_ack_interval
   
   // -1 means disabled and rely on replication_ack_interval only
   // N >= 1 means ack after N changes
   // TBD: check the threshold at the end of `IncrementBatchLoop` or in the mid 
of `IncrementBatchLoop`.
   replication_ack_seq_threshold
   ```
   
   The current unstable branch behavior is equivalent to:
   ```
   replication_ack_interval: -1
   replication_ack_seq_buffer: 1
   ```
   
   Default value would be:
   ```
   replication_ack_interval: 15s // something close to metrics scrape interval
   replication_ack_seq_buffer: -1
   ```


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