git-hulk commented on code in PR #3271:
URL: https://github.com/apache/kvrocks/pull/3271#discussion_r2563814112
##########
src/server/server.cc:
##########
@@ -1214,23 +1214,27 @@ Server::InfoEntries Server::GetReplicationInfo() {
entries.emplace_back("slave_priority", config_->slave_priority);
}
- int idx = 0;
- rocksdb::SequenceNumber latest_seq = storage->LatestSeqNumber();
-
+ std::vector<std::tuple<std::string, uint32_t, uint64_t>> slave_repl_seq;
{
std::shared_lock<std::shared_mutex> guard(slave_threads_mu_);
entries.emplace_back("connected_slaves", slave_threads_.size());
for (const auto &slave : slave_threads_) {
if (slave->IsStopped()) continue;
- entries.emplace_back(
Review Comment:
@greatsharp Could we just simply normalize the lag to `0` if the latest
sequence number < slave reply offset?
--
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]