Add more sync point to fix flaky test GroupCommitTest

Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/4637

Differential Revision: D12963727

Pulled By: miasantreble

fbshipit-source-id: 76053501afbecc6ef388ddc56542fa0185243e3f
This commit is contained in:
Zhongyi Xie 2018-11-07 14:03:47 -08:00 committed by Facebook Github Bot
parent bec59f9072
commit fce5994603
2 changed files with 4 additions and 1 deletions

View File

@ -2351,7 +2351,9 @@ TEST_F(DBTest, GroupCommitTest) {
rocksdb::SyncPoint::GetInstance()->LoadDependency(
{{"WriteThread::JoinBatchGroup:BeganWaiting",
"DBImpl::WriteImpl:BeforeLeaderEnters"}});
"DBImpl::WriteImpl:BeforeLeaderEnters"},
{"WriteThread::AwaitState:BlockingWaiting",
"WriteThread::EnterAsBatchGroupLeader:End"}});
rocksdb::SyncPoint::GetInstance()->EnableProcessing();
// Start threads

View File

@ -181,6 +181,7 @@ uint8_t WriteThread::AwaitState(Writer* w, uint8_t goal_mask,
}
if ((state & goal_mask) == 0) {
TEST_SYNC_POINT_CALLBACK("WriteThread::AwaitState:BlockingWaiting", w);
state = BlockingAwaitState(w, goal_mask);
}