From 4978caaa6f793975f157c13f489ebdb06dc12017 Mon Sep 17 00:00:00 2001 From: Sagar Vemuri Date: Mon, 28 Jan 2019 13:28:31 -0800 Subject: [PATCH] Remove a redundant call to TableFileName in CompactionJob::FinishCompactionOutputFile (#4925) Summary: While stepping through the code I noticed that there is a redundant call to TableFileName. Pull Request resolved: https://github.com/facebook/rocksdb/pull/4925 Differential Revision: D13845749 Pulled By: sagar0 fbshipit-source-id: 31db45716b4d720e0e0350dd457b49d6f1848e7d --- db/compaction_job.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/db/compaction_job.cc b/db/compaction_job.cc index 3ce38453f..55ae0d864 100644 --- a/db/compaction_job.cc +++ b/db/compaction_job.cc @@ -1405,10 +1405,7 @@ Status CompactionJob::FinishCompactionOutputFile( auto sfm = static_cast(db_options_.sst_file_manager.get()); if (sfm && meta != nullptr && meta->fd.GetPathId() == 0) { - auto fn = - TableFileName(sub_compact->compaction->immutable_cf_options()->cf_paths, - meta->fd.GetNumber(), meta->fd.GetPathId()); - sfm->OnAddFile(fn); + sfm->OnAddFile(fname); if (sfm->IsMaxAllowedSpaceReached()) { // TODO(ajkr): should we return OK() if max space was reached by the final // compaction output file (similarly to how flush works when full)?