yugabyte/yugabyte-db

Audit use of ForceRocksDBCompactInTest and rename

Open

#5.611 geöffnet am 8. Sept. 2020

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)C (1.003 Forks)batch import
area/docdbgood first issuekind/enhancementpriority/medium

Repository-Metriken

Stars
 (8.229 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 17T 21h) (92 gemergte PRs in 30 T)

Beschreibung

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

Contributor Guide