Skip to content

Commit

Permalink
Removed unnecesary file object in table_cache.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dhruba committed Mar 4, 2013
1 parent 993543d commit f589668
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions db/table_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
namespace leveldb {

struct TableAndFile {
unique_ptr<RandomAccessFile> file;
unique_ptr<Table> table;
};

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

0 comments on commit f589668

Please sign in to comment.