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
main
Dhruba Borthakur 12 years ago
parent 993543d1be
commit f5896681b4
  1. 3
      db/table_cache.cc

@ -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);
}
}

Loading…
Cancel
Save