PragmaTwice commented on code in PR #2894:
URL: https://github.com/apache/kvrocks/pull/2894#discussion_r2059526851
##########
src/cluster/replication.cc:
##########
@@ -737,27 +733,26 @@ ReplicationThread::CBState
ReplicationThread::fullSyncReadCB(bufferevent *bev) {
s = storage_->RestoreFromCheckpoint();
}
if (!s.IsOK()) {
- LOG(ERROR) << "[replication] Failed to restore backup while " +
s.Msg() + ", restart fullsync";
+ error("[replication] Failed to restore backup while {}, restart
fullsync", s.Msg());
post_fullsync_cb_();
return CBState::RESTART;
}
- LOG(INFO) << "[replication] Succeeded restoring the backup, fullsync was
finish";
+ info("[replication] Succeeded restoring the backup, fullsync was
finish");
post_fullsync_cb_();
// It needs to reload namespaces from DB after the full sync is done,
// or namespaces are not visible in the replica.
s = srv_->GetNamespace()->LoadAndRewrite();
if (!s.IsOK()) {
- LOG(ERROR) << "[replication] Failed to load and rewrite namespace: "
<< s.Msg();
+ error("[replication] Failed to load and rewrite namespace: {}",
s.Msg());
}
// Switch to psync state machine again
psync_steps_.Start();
return CBState::QUIT;
}
}
-
- LOG(ERROR) << "Should not arrive here";
+ error("Should not arrive here");
assert(false);
return CBState::QUIT;
Review Comment:
```suggestion
unreachable();
```
--
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]