提交 f5896681 编写于 作者: D Dhruba Borthakur

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
上级 993543d1
......@@ -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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册