git-hulk commented on code in PR #3357:
URL: https://github.com/apache/kvrocks/pull/3357#discussion_r2753826123
##########
src/config/config.cc:
##########
@@ -206,6 +206,8 @@ Config::Config() {
{"replication-no-slowdown", false, new
YesNoField(&replication_no_slowdown, true)},
{"replication-delay-bytes", false, new
IntField(&max_replication_delay_bytes, 16 * 1024, 1, INT_MAX)},
{"replication-delay-updates", false, new
IntField(&max_replication_delay_updates, 16, 1, INT_MAX)},
+ {"max-replication-lag", false, new Int64Field(&max_replication_lag,
100000000, 1, INT64_MAX)},
Review Comment:
@ethervoid Thank you! We also need to update `100000000` => 0 and `1` => `0`
at this line.
##########
src/common/io_util.cc:
##########
@@ -468,6 +471,93 @@ Status SockSend(int fd, const std::string &data,
[[maybe_unused]] bufferevent *b
#endif
}
+Status SockSendWithTimeout(int fd, const std::string &data, int timeout_ms) {
+ ssize_t n = 0;
+ auto start = std::chrono::steady_clock::now();
+
+ while (n < static_cast<ssize_t>(data.size())) {
Review Comment:
@ethervoid Thanks for your reply and investigation. I forgot the difference.
That makes sense to me.
--
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]