Removed unnecesary file object in table_cache.
Summary: TableCache->file is not used. remove it. I kept the TableAndFile structure and will clean it up in a future patch. Test Plan: make clean check Reviewers: sheki, chip Reviewed By: chip CC: leveldb Differential Revision: https://reviews.facebook.net/D9075
This commit is contained in:
parent
993543d1be
commit
f5896681b4
@ -14,7 +14,6 @@
|
|||||||
namespace leveldb {
|
namespace leveldb {
|
||||||
|
|
||||||
struct TableAndFile {
|
struct TableAndFile {
|
||||||
unique_ptr<RandomAccessFile> file;
|
|
||||||
unique_ptr<Table> table;
|
unique_ptr<Table> table;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -72,8 +71,8 @@ Status TableCache::FindTable(uint64_t file_number, uint64_t file_size,
|
|||||||
// or somebody repairs the file, we recover automatically.
|
// or somebody repairs the file, we recover automatically.
|
||||||
} else {
|
} else {
|
||||||
TableAndFile* tf = new TableAndFile;
|
TableAndFile* tf = new TableAndFile;
|
||||||
tf->file = std::move(file);
|
|
||||||
tf->table = std::move(table);
|
tf->table = std::move(table);
|
||||||
|
assert(file.get() == nullptr);
|
||||||
*handle = cache_->Insert(key, tf, 1, &DeleteEntry);
|
*handle = cache_->Insert(key, tf, 1, &DeleteEntry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user