yugabyte/yugabyte-db

Audit use of ForceRocksDBCompactInTest and rename

Open

#5,611 建立於 2020年9月8日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)C (1,003 fork)batch import
area/docdbgood first issuekind/enhancementpriority/medium

倉庫指標

Star
 (8,229 star)
PR 合併指標
 (平均合併 17天 21小時) (30 天內合併 92 個 PR)

描述

Jira Link: DB-1508 Despite this methods name, we seem to have used this method in void TabletServiceAdminImpl::FlushTablets

void Tablet::ForceRocksDBCompactInTest() {
  if (regular_db_) {
    docdb::ForceRocksDBCompact(regular_db_.get());
  }
  if (intents_db_) {
    CHECK_OK(intents_db_->Flush(rocksdb::FlushOptions()));
    docdb::ForceRocksDBCompact(intents_db_.get());
  }
}

One obvious issue with this method in production code is the use of CHECK_OK. This only affects admin CLI flush commands, so this isn't a huge deal, but we should fix this regardless and ensure there are no other obvious or subtle issues with using this in production

cc @spolitov

貢獻者指南