zhixinwen opened a new pull request, #3047:
URL: https://github.com/apache/kvrocks/pull/3047

   This PR implements Redis [WAIT](https://redis.io/docs/latest/commands/wait/) 
command (pending timeout implementation).
   
   The WAIT command works as follows:
   1. Get the current RocksDB latest sequence.
   2. Check each replica if they have reached the sequence returned in step 1.  
        1. If yes, directly return.
         2. If not, put the command to blocking.
   3. When master sends changes to replicas, wake up the blocked command and 
see if it meets the number of replicas meet.
   
   Key differences from Redis:
   1. Timeout not supported. I tired it initially and 
[reverted](https://github.com/apache/kvrocks/commit/92bec60b606ccb0aaf8beae70b3d4a838423dc2f),
 because it has a bug that if master has no new update, the timeout would not 
be respected. It is more complicated than I expect to do properly. We can 
follow up on this support later, as I want to ensure the overall impl looks 
good.
   2. Redis tracks latest write per client, but KVRocks is global. 
   3. Redis replica would ack with the sequence number it has processed. 
KVRocks is fire and forget style, so when WAIT returns it only guarantees the 
change has been sent to client, but it does not guarantee client has processed 
it.


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