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 udi-speedb committed Oct 31, 2023
1 parent 5401fb7 commit e62b6b7
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 @@ -1744,9 +1744,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 @@ -3003,7 +3003,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 e62b6b7

Please sign in to comment.