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

Method AddFile

src/leveldb/db/version_edit.h:63–71  ·  view source on GitHub ↗

Add the specified file at the specified number. REQUIRES: This version has not been saved (see VersionSet::SaveTo) REQUIRES: "smallest" and "largest" are smallest and largest keys in file

Source from the content-addressed store, hash-verified

61 // REQUIRES: This version has not been saved (see VersionSet::SaveTo)
62 // REQUIRES: "smallest" and "largest" are smallest and largest keys in file
63 void AddFile(int level, uint64_t file, uint64_t file_size,
64 const InternalKey& smallest, const InternalKey& largest) {
65 FileMetaData f;
66 f.number = file;
67 f.file_size = file_size;
68 f.smallest = smallest;
69 f.largest = largest;
70 new_files_.push_back(std::make_pair(level, f));
71 }
72
73 // Delete the specified "file" from the specified "level".
74 void DeleteFile(int level, uint64_t file) {

Callers 7

BM_LogAndApplyFunction · 0.80
WriteLevel0TableMethod · 0.80
BackgroundCompactionMethod · 0.80
WriteDescriptorMethod · 0.80
TESTFunction · 0.80
WriteSnapshotMethod · 0.80

Calls 1

push_backMethod · 0.45

Tested by 2

BM_LogAndApplyFunction · 0.64
TESTFunction · 0.64