Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

fix balance thread hang up #502

Merged
merged 4 commits into from
Jun 23, 2021
Merged

fix balance thread hang up #502

merged 4 commits into from
Jun 23, 2021

Conversation

critical27
Copy link
Contributor

If future's callback is invoked before the future is set. And in the callback, baton will wait forever.

p.setValue(Status::OK());
} else {
p.setValue(Status::Error("Access kv failed, code: %s",
apache::thrift::util::enumNameSafe(code).c_str()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry to say alignment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂 my poor vscode, hold on

Copy link
Contributor

@bright-starry-sky bright-starry-sky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great job,It's a difficult problem to identify.

@@ -43,8 +43,8 @@ void HBProcessor::process(const cpp2::HBReq& req) {
}
}

VLOG(3) << "Receive heartbeat from " << host
<< ", role = " << apache::thrift::util::enumNameSafe(req.get_role());
LOG(INFO) << "Receive heartbeat from " << host
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VLOG(1)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously was INFO, modified to VLOG(3) by others. It is the most convenient way to tell which is meta leader.

@@ -315,7 +315,7 @@ void FileBasedWal::closeCurrFile() {
timebuf.modtime = currInfo_->mtime();
timebuf.actime = currInfo_->mtime();
VLOG(1) << "Close cur file " << currInfo_->path() << ", mtime: " << currInfo_->mtime();
CHECK_EQ(utime(currInfo_->path(), &timebuf), 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's reason? no need to check the system error?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants