| 1490 | } |
| 1491 | |
| 1492 | bool 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 | |
| 1502 | void Compaction::AddInputDeletions(VersionEdit* edit) { |
| 1503 | for (int which = 0; which < 2; which++) { |
no test coverage detected