MCPcopy Create free account
hub / github.com/ElementsProject/elements / IsTrivialMove

Method IsTrivialMove

src/leveldb/db/version_set.cc:1492–1500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1490}
1491
1492bool Compaction::IsTrivialMove() const {
1493 const VersionSet* vset = input_version_->vset_;
1494 // Avoid a move if there is lots of overlapping grandparent data.
1495 // Otherwise, the move could create a parent file that will require
1496 // a very expensive merge later on.
1497 return (num_input_files(0) == 1 && num_input_files(1) == 0 &&
1498 TotalFileSize(grandparents_) <=
1499 MaxGrandParentOverlapBytes(vset->options_));
1500}
1501
1502void Compaction::AddInputDeletions(VersionEdit* edit) {
1503 for (int which = 0; which < 2; which++) {

Callers 1

BackgroundCompactionMethod · 0.80

Calls 2

TotalFileSizeFunction · 0.85

Tested by

no test coverage detected