From 3e8684b8af897f987b21e16185c76f51209cc1d4 Mon Sep 17 00:00:00 2001 From: Maciej Szeszko Date: Fri, 17 Jan 2025 13:50:22 -0800 Subject: [PATCH] Fix tests & linter errors --- utilities/backup/backup_engine.cc | 1 - utilities/backup/backup_engine_test.cc | 8 +------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/utilities/backup/backup_engine.cc b/utilities/backup/backup_engine.cc index 3f16410bfa1..efd80772b9c 100644 --- a/utilities/backup/backup_engine.cc +++ b/utilities/backup/backup_engine.cc @@ -3054,7 +3054,6 @@ void BackupEngineImpl::InferDBFilesToRetainInRestore( continue; } - auto backup_checksum_hex = it->second; if (it->second != result.checksum_hex) { Log(options_.info_log, "Checksum mismatch between backup file and existing file '%s'.", diff --git a/utilities/backup/backup_engine_test.cc b/utilities/backup/backup_engine_test.cc index a36fbe57f1b..07b1b5d1845 100644 --- a/utilities/backup/backup_engine_test.cc +++ b/utilities/backup/backup_engine_test.cc @@ -1151,12 +1151,6 @@ TEST_F(BackupEngineTest, IncrementalRestore) { } } - // Files filled with data have lower #s. - // It's handy to know which files are non-empty and - // therefore easier to corrupt for the sake of testing. - std::sort(all_sst_files.begin(), all_sst_files.end()); - std::sort(all_blob_files.begin(), all_blob_files.end()); - std::string one_sst_file = all_sst_files[0]; // 2. Verify expected behavior with exclude files feature. @@ -1265,7 +1259,7 @@ TEST_F(BackupEngineTest, IncrementalRestore) { // (by overriding bytes beyond the footer) to corrupt a file in a more // harmful way... std::string sst_file_to_be_corrupted = all_sst_files[0]; - ASSERT_OK(db_file_manager_->CorruptFileMiddle(sst_file_to_be_corrupted)); + ASSERT_OK(db_file_manager_->CorruptFileStart(sst_file_to_be_corrupted)); OpenBackupEngine();