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
| 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) { |