Skip to content

Commit

Permalink
#34: set purges as Pri::Low
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuval-Ariel authored and AmnonHanuhov committed Sep 6, 2022
1 parent 8554fcf commit ead8128
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions db/db_impl/db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1540,9 +1540,9 @@ void DBImpl::SchedulePurge() {
mutex_.AssertHeld();
assert(opened_successfully_);

// Purge operations are put into High priority queue
// Purge operations are put into the low priority queue
bg_purge_scheduled_++;
env_->Schedule(&DBImpl::BGWorkPurge, this, Env::Priority::HIGH, nullptr);
env_->Schedule(&DBImpl::BGWorkPurge, this, Env::Priority::LOW, nullptr);
}

void DBImpl::BackgroundCallPurge() {
Expand Down
2 changes: 1 addition & 1 deletion db/db_impl/db_impl_compaction_flush.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2661,7 +2661,7 @@ void DBImpl::BGWorkBottomCompaction(void* arg) {
}

void DBImpl::BGWorkPurge(void* db) {
IOSTATS_SET_THREAD_POOL_ID(Env::Priority::HIGH);
IOSTATS_SET_THREAD_POOL_ID(Env::Priority::LOW);
TEST_SYNC_POINT("DBImpl::BGWorkPurge:start");
reinterpret_cast<DBImpl*>(db)->BackgroundCallPurge();
TEST_SYNC_POINT("DBImpl::BGWorkPurge:end");
Expand Down

0 comments on commit ead8128

Please sign in to comment.