zhixinwen commented on code in PR #3075:
URL: https://github.com/apache/kvrocks/pull/3075#discussion_r2248684022
##########
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 _getack to the slave to get acknowledgment
+ auto s = util::SockSend(conn_->GetFD(), redis::BulkString("_getack"),
conn_->GetBufferEvent());
+ if (!s.IsOK()) {
+ error("Write error while sending _getack to slave: {}", s.Msg());
+ Stop();
+ return;
+ } else {
+ last_replconf_getack_seq_ = largest_unblockable_seq;
Review Comment:
Seeing the following error on replication after the change
```
[2025-08-01T19:02:56.378886+00:00][E][event_listener.cc:177]
[event_listener/background_error] reason: memtable, bg_error: Corruption:
malformed WriteBatch (too small)
[2025-08-01T19:02:56.378938+00:00][E][replication.cc:715] [replication]
CRITICAL - Failed to write batch to local, Corruption: malformed WriteBatch
(too small). batch: 0x55710100000000
```
--
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]