From f5896681b4890f311c047057a3477a1bc681a4d2 Mon Sep 17 00:00:00 2001 From: Dhruba Borthakur Date: Mon, 4 Mar 2013 13:33:16 -0800 Subject: [PATCH] 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 --- db/table_cache.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/db/table_cache.cc b/db/table_cache.cc index 9311bffa9..f83578e5b 100644 --- a/db/table_cache.cc +++ b/db/table_cache.cc @@ -14,7 +14,6 @@ namespace leveldb { struct TableAndFile { - unique_ptr file; unique_ptr 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); } } -- GitLab