Skip to content

Commit

Permalink
fix: code review
Browse files Browse the repository at this point in the history
  • Loading branch information
veezhang committed Dec 26, 2022
1 parent ffe6ae9 commit 3cf931c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/kvstore/DiskManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ DiskManager::DiskManager(const std::vector<std::string>& dataPaths,
paths_.store(paths);
size_t index = 0;

// TODO: Add initialize function to avoid using LOG(FATAL) in constructor.
// TODO(vee): Add initialize function to avoid using LOG(FATAL) in constructor.
for (const auto& path : dataPaths) {
auto absolute = boost::filesystem::absolute(path);
if (!boost::filesystem::exists(absolute)) {
Expand Down
2 changes: 1 addition & 1 deletion src/kvstore/RocksEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ RocksEngine::RocksEngine(GraphSpaceID spaceId,
}
auto path = folly::stringPrintf("%s/data", dataPath_.c_str());

// TODO: Add initialize function to avoid using LOG(FATAL) in constructor.
// TODO(vee): Add initialize function to avoid using LOG(FATAL) in constructor.
if (FileUtils::fileType(path.c_str()) == FileType::NOTEXIST) {
if (readonly) {
LOG(FATAL) << "Path " << path << " not exist";
Expand Down
2 changes: 1 addition & 1 deletion src/kvstore/listener/Listener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void Listener::start(std::vector<HostAddr>&& peers, bool) {
std::lock_guard<std::mutex> g(raftLock_);

if (!init()) {
// TODO: return bool to avoid using LOG(FATAL)
// TODO(vee): return bool to avoid using LOG(FATAL)
LOG(FATAL) << "Listener init failed";
}

Expand Down
3 changes: 0 additions & 3 deletions src/kvstore/raftex/RaftPart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1092,9 +1092,6 @@ void RaftPart::processAppendLogResponses(const AppendLogResponses& resps,
}
} else {
LOG(DFATAL) << idStr_ << "Failed to commit logs";
checkAppendLogResult(code);
VLOG(3) << idStr_ << "commitLogs failed";
iter.commit(code);
return;
}
VLOG(4) << idStr_ << "Leader succeeded in committing the logs " << committedId + 1 << " to "
Expand Down

0 comments on commit 3cf931c

Please sign in to comment.