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

Method CleanupCompaction

src/leveldb/db/db_impl.cc:779–794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

777}
778
779void DBImpl::CleanupCompaction(CompactionState* compact) {
780 mutex_.AssertHeld();
781 if (compact->builder != nullptr) {
782 // May happen if we get a shutdown call in the middle of compaction
783 compact->builder->Abandon();
784 delete compact->builder;
785 } else {
786 assert(compact->outfile == nullptr);
787 }
788 delete compact->outfile;
789 for (size_t i = 0; i < compact->outputs.size(); i++) {
790 const CompactionState::Output& out = compact->outputs[i];
791 pending_outputs_.erase(out.number);
792 }
793 delete compact;
794}
795
796Status DBImpl::OpenCompactionOutputFile(CompactionState* compact) {
797 assert(compact != nullptr);

Callers

nothing calls this directly

Calls 3

AbandonMethod · 0.80
sizeMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected