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

Method DeleteAnSSTFile

src/leveldb/db/db_test.cc:501–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499 }
500
501 bool DeleteAnSSTFile() {
502 std::vector<std::string> filenames;
503 ASSERT_OK(env_->GetChildren(dbname_, &filenames));
504 uint64_t number;
505 FileType type;
506 for (size_t i = 0; i < filenames.size(); i++) {
507 if (ParseFileName(filenames[i], &number, &type) && type == kTableFile) {
508 ASSERT_OK(env_->DeleteFile(TableFileName(dbname_, number)));
509 return true;
510 }
511 }
512 return false;
513 }
514
515 // Returns number of files renamed.
516 int RenameLDBToSST() {

Callers

nothing calls this directly

Calls 5

ParseFileNameFunction · 0.85
TableFileNameFunction · 0.85
GetChildrenMethod · 0.45
sizeMethod · 0.45
DeleteFileMethod · 0.45

Tested by

no test coverage detected