zhixinwen commented on code in PR #3075:
URL: https://github.com/apache/kvrocks/pull/3075#discussion_r2241480443
##########
src/cluster/replication.cc:
##########
@@ -203,6 +206,21 @@ void FeedSlaveThread::loop() {
Stop();
return;
}
+
+ // Check if this change would unblock any WAIT command
+ auto largest_unblockable_seq =
srv_->LargestTargetSeqToWakeup(batch.sequence);
+ if (largest_unblockable_seq > last_replconf_getack_seq_) {
+ // Send replconf getack to the slave to get acknowledgment
+ auto s = util::SockSend(conn_->GetFD(), redis::BulkString("replconf
getack"), conn_->GetBufferEvent());
Review Comment:
I don't think there is a good way to pass actual command to the replication
instance in the current architecture.
I can change `replconf getack` to `_getack` so it is less confusing.
In terms of compatibility, I don't see a good way either. If we do need to
make breaking change, I feel we would need to add a handshake step to determine
the protocol version. I think the current replication logic has the same
issue, you have some extra flexibility to pass in some more flags, but it is
hard to change the flow.
Let me know if you have better ideas.
--
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]