Fixed the unit-test issue in PreShutdownCompactionMiddle

Summary: Fixed the unit-test issue in PreShutdownCompactionMiddle

Test Plan: export ROCKSDB_TESTS=PreShutdownCompactionMiddle

Reviewers: rven, sdong, igor

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D35061
main
Yueh-Hsuan Chiang 10 years ago
parent fd1b3f385a
commit 12134139e3
  1. 2
      db/compaction_job.cc
  2. 8
      db/db_test.cc

@ -550,7 +550,7 @@ Status CompactionJob::ProcessKeyValueCompaction(int64_t* imm_micros,
compaction_filter = compaction_filter_from_factory.get();
}
TEST_SYNC_POINT("CompactionJob::Run:Inprogress");
TEST_SYNC_POINT("CompactionJob::Run():Inprogress");
int64_t key_drop_user = 0;
int64_t key_drop_newer_entry = 0;

@ -10383,9 +10383,9 @@ TEST(DBTest, PreShutdownCompactionMiddle) {
// Delay both flush and compaction
rocksdb::SyncPoint::GetInstance()->LoadDependency(
{{"DBTest::PreShutdownMultipleCompaction:Preshutdown",
"CompactionJob::Run:Inprogress"},
{"CompactionJob::Run:Inprogress", "CompactionJob::Run:End"},
{"CompactionJob::Run:End",
"CompactionJob::Run():Inprogress"},
{"CompactionJob::Run():Inprogress", "CompactionJob::Run():End"},
{"CompactionJob::Run():End",
"DBTest::PreShutdownMultipleCompaction:VerifyPreshutdown"}});
rocksdb::SyncPoint::GetInstance()->EnableProcessing();
@ -10604,7 +10604,7 @@ TEST(DBTest, DynamicLevelMaxBytesBase2) {
// level.
// Hold compaction jobs to make sure
rocksdb::SyncPoint::GetInstance()->SetCallBack(
"CompactionJob::Run:Start",
"CompactionJob::Run():Start",
[&]() { env_->SleepForMicroseconds(100000); });
rocksdb::SyncPoint::GetInstance()->EnableProcessing();
ASSERT_OK(dbfull()->SetOptions({

Loading…
Cancel
Save