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

   Change `wait_contexts_mu_` and `slave_threads_mu_` to `shared_mutex`.
   The main motivation is:
   1. WAIT command uses `GetReplicasReachedSequence` to find out the number of 
replicas it has reached. If `slave_threads_mu_` uses `unique_lock`, all WAIT 
cmd needs to be serialized. Also metrics needs to grab `slave_threads_mu_` and 
it would also slow dow WAIT.
   2. `wait_contexts_mu_` is grabbed by `LargestTargetSeqToWakeup` and it is 
being called frequently when WAIT is used heavily. `LargestTargetSeqToWakeup` 
is read only so the change can reduce lock contension.


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