zhixinwen opened a new pull request, #3243: URL: https://github.com/apache/kvrocks/pull/3243
In order to reduce unnecessary callbacks, we set read watermark based on data size: https://github.com/apache/kvrocks/blob/2b7e69a5acd9e1490b96aafc84746d1baef6579e/src/cluster/replication.cc#L700 However, this watermark is not reset after reading the data, which could result in stuck replication. For example: 1. A batch of size 16kb is received by replica and watermark is set to 16kb 2. A PING was received after the batch by the replica and the callback returns without resetting the watermark. Replica would continue to process data only after master sends at least 16kb data. 3. Master only sent 1kb data, and that data is not processed by replica until master sends enough PING to replica to trigger the 16kb watermark. This causes the replication to get stuck. -- 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]
