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:
Dhruba Borthakur 2013-03-04 13:33:16 -08:00
parent 993543d1be
commit f5896681b4

View File

@ -14,7 +14,6 @@
namespace leveldb {
struct TableAndFile {
unique_ptr<RandomAccessFile> file;
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.
} else {
TableAndFile* tf = new TableAndFile;
tf->file = std::move(file);
tf->table = std::move(table);
assert(file.get() == nullptr);
*handle = cache_->Insert(key, tf, 1, &DeleteEntry);
}
}