Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compaction limiter miscs #4795

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions db/db_compaction_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4053,7 +4053,7 @@ TEST_F(DBCompactionTest, CompactionLimiter) {
dbfull()->TEST_WaitForFlushMemTable(handles_[cf]);
}

dbfull()->TEST_WaitForCompact();
ASSERT_OK(dbfull()->TEST_WaitForCompact());

// Max outstanding compact tasks reached limit
for (auto& ls : limiter_settings) {
Expand All @@ -4076,8 +4076,7 @@ TEST_F(DBCompactionTest, CompactionLimiter) {
ASSERT_EQ(1, NumTableFilesAtLevel(0, cf_test));

Compact(cf_test, Key(0), Key(keyIndex));
dbfull()->TEST_WaitForCompact();
ASSERT_EQ(0, unique_limiter->GetOutstandingTask());
ASSERT_OK(dbfull()->TEST_WaitForCompact());
}

INSTANTIATE_TEST_CASE_P(DBCompactionTestWithParam, DBCompactionTestWithParam,
Expand Down
3 changes: 0 additions & 3 deletions db/db_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1114,9 +1114,6 @@ class DBImpl : public DB {
// Schedule background tasks
void StartTimedTasks();

void SubtractCompactionTask(const std::string& device_name,
LogBuffer* log_buffer);

void PrintStatistics();

// dump rocksdb.stats to LOG
Expand Down
1 change: 1 addition & 0 deletions util/concurrent_task_limiter_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ ConcurrentTaskLimiterImpl::ConcurrentTaskLimiterImpl(
}

ConcurrentTaskLimiterImpl::~ConcurrentTaskLimiterImpl() {
assert(outstanding_tasks_ == 0);
}

const std::string& ConcurrentTaskLimiterImpl::GetName() const {
Expand Down