Timing of sending "REPLCONF GETACK *" for the Redis master server

I am confused about the timing of sending “REPLCONF GETACK *” for the master
should it

  • be sent after the master sends ‘SET’
    or
  • be sent after the master receives the ‘WAIT’ command?
1 Like

After WAIT :slightly_smiling_face: The logic here would be:

  • Are there enough clients that I’m aware of that have an up-to-date replication offset?
    • if yes, return count right away and don’t send GETACKs.
    • If no, append a GETACK to the replication stream (so ALL replicas will get it), and wait for the ACKs to pour in

Thanks!

Follow up question

My implement now is

  • it won’t send GETACKs after sending SET (for Redis Asynchronous replication), so I don’t know if replica have up-to-date replication offset
  • It will send GETACKs to the replication stream in every WAIT command

My question is

  • how to know have an up-to-date replication offset without sending GETACK to the replication stream?
  • or does it make sense to send GETACKs to the replication stream in every WAIT command?

@nissenyeh just checking, did you find answers to those questions? Do you still need any assistance with them?

Closing this thread due to inactivity. If you still need assistance, feel free to reopen or start a new discussion!

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.