From f5ed19b88f63cacb6731d77f8580196637000278 Mon Sep 17 00:00:00 2001 From: yuval-io <105581454+Yuval-Ariel@users.noreply.github.com> Date: Sun, 15 Oct 2023 10:25:57 +0300 Subject: [PATCH] Revert "Fix some build issues (#664)" This reverts commit 877f2a521da46360afe37192852af18751afae75. --- db/import_column_family_job.cc | 12 ++++++------ tools/db_bench_tool.cc | 2 -- utilities/ttl/ttl_test.cc | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/db/import_column_family_job.cc b/db/import_column_family_job.cc index cb123d015a..6a7217b0d7 100644 --- a/db/import_column_family_job.cc +++ b/db/import_column_family_job.cc @@ -41,14 +41,16 @@ namespace ROCKSDB_NAMESPACE { Status ImportColumnFamilyJob::Prepare(uint64_t next_file_number, SuperVersion* sv) { + Status status; + // Read the information of files we are importing for (const auto& file_metadata : metadata_) { const auto file_path = file_metadata.db_path + "/" + file_metadata.name; IngestedFileInfo file_to_import; - Status s = GetIngestedFileInfo(file_path, next_file_number++, sv, - file_metadata, &file_to_import); - if (!s.ok()) { - return s; + status = GetIngestedFileInfo(file_path, next_file_number++, sv, + file_metadata, &file_to_import); + if (!status.ok()) { + return status; } files_to_import_.push_back(file_to_import); } @@ -68,8 +70,6 @@ Status ImportColumnFamilyJob::Prepare(uint64_t next_file_number, } } - Status status; - // Copy/Move external files into DB auto hardlink_files = import_options_.move_files; for (auto& f : files_to_import_) { diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc index c0218b5c3b..d03522104d 100644 --- a/tools/db_bench_tool.cc +++ b/tools/db_bench_tool.cc @@ -7717,8 +7717,6 @@ class Benchmark { thread->stats.FinishedOps(&single_db, single_db.db, 1, kSeek); } - (void)num_seek_to_first; - (void)num_next; delete iter; } diff --git a/utilities/ttl/ttl_test.cc b/utilities/ttl/ttl_test.cc index 0c48dd5717..ab48fe90fe 100644 --- a/utilities/ttl/ttl_test.cc +++ b/utilities/ttl/ttl_test.cc @@ -1008,7 +1008,7 @@ TEST_F(TtlTest, SkipExpiredReadOnlyTtlMultiGetTest) { ASSERT_OK(DBWithTTL::Open(options, dbname_, &db_ttl_, ttl_)); ASSERT_OK(db_ttl_->Put(WriteOptions(), key_1, put_value)); ASSERT_OK(db_ttl_->Put(WriteOptions(), key_2, put_value)); - ASSERT_OK(db_ttl_->Close()); + db_ttl_->Close(); ASSERT_OK(DBWithTTL::Open(options, dbname_, &db_ttl_, ttl_, true)); env_->Sleep(ttl_ + 1); auto statuses = db_ttl_->MultiGet(ropts, {key_1, key_2}, &values); @@ -1030,7 +1030,7 @@ TEST_F(TtlTest, GetNotExpiredReadOnlyTtlGetTest) { std::string put_value = "val"; ASSERT_OK(DBWithTTL::Open(options, dbname_, &db_ttl_, ttl_)); ASSERT_OK(db_ttl_->Put(WriteOptions(), key, put_value)); - ASSERT_OK(db_ttl_->Close()); + db_ttl_->Close(); // open ttl as read only ASSERT_OK(DBWithTTL::Open(options, dbname_, &db_ttl_, ttl_, true)); env_->Sleep(ttl_ + 1);