Skip to content

Commit 405863c

Browse files
committed
fix build
1 parent 6897425 commit 405863c

File tree

2 files changed

+2
-58
lines changed

2 files changed

+2
-58
lines changed

db/compaction/compaction_job.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1593,7 +1593,6 @@ Status CompactionJob::ProcessKeyValue(
15931593
SubcompactionState* sub_compact, ColumnFamilyData* cfd,
15941594
CompactionIterator* c_iter, const CompactionFileOpenFunc& open_file_func,
15951595
const CompactionFileCloseFunc& close_file_func, uint64_t& prev_cpu_micros) {
1596-
Status status;
15971596
// Unified cron interval for periodic operations: stats update, abort check,
15981597
// and sync points. Uses 1000 to maintain responsive abort checking.
15991598
const uint64_t kCronEvery = 1000;
@@ -1604,6 +1603,7 @@ Status CompactionJob::ProcessKeyValue(
16041603
return Status::Incomplete(Status::SubCode::kCompactionAborted);
16051604
}
16061605

1606+
Status status;
16071607
IterKey prev_iter_output_key;
16081608
ParsedInternalKey prev_iter_output_internal_key;
16091609

db/db_compaction_abort_test.cc

Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -614,62 +614,6 @@ TEST_F(DBCompactionAbortTest, AbortCompactFilesAPI) {
614614
VerifyDataIntegrity(/*num_keys=*/100);
615615
}
616616

617-
TEST_F(DBCompactionAbortTest, AbortWithMultipleColumnFamilies) {
618-
// Test that AbortAllCompactions affects all column families
619-
Options options = CurrentOptions();
620-
options.level0_file_num_compaction_trigger = 4;
621-
options.max_subcompactions = 2;
622-
options.disable_auto_compactions = true;
623-
624-
CreateAndReopenWithCF({"cf1", "cf2"}, options);
625-
626-
Random rnd(301);
627-
628-
// Write to all column families
629-
for (int cf = 0; cf < 3; ++cf) {
630-
for (int i = 0; i < 4; ++i) {
631-
for (int j = 0; j < 100; ++j) {
632-
ASSERT_OK(Put(cf, Key(j), rnd.RandomString(500)));
633-
}
634-
ASSERT_OK(Flush(cf));
635-
}
636-
}
637-
638-
AbortSynchronizer abort_sync;
639-
640-
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->SetCallBack(
641-
"CompactionJob::ProcessKeyValueCompaction:Start",
642-
[&](void* /*arg*/) { abort_sync.TriggerAbort(dbfull()); });
643-
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->EnableProcessing();
644-
645-
// Try to compact all column families
646-
CompactRangeOptions cro;
647-
for (int cf = 0; cf < 3; ++cf) {
648-
Status s = dbfull()->CompactRange(cro, handles_[cf], nullptr, nullptr);
649-
ASSERT_TRUE(s.IsIncomplete());
650-
ASSERT_TRUE(s.IsCompactionAborted());
651-
}
652-
653-
CleanupSyncPoints();
654-
655-
abort_sync.WaitForAbortCompletion();
656-
dbfull()->ResumeAllCompactions();
657-
658-
// Compaction should work after resume for all CFs
659-
for (int cf = 0; cf < 3; ++cf) {
660-
ASSERT_OK(dbfull()->CompactRange(cro, handles_[cf], nullptr, nullptr));
661-
}
662-
663-
// Verify data integrity for all CFs
664-
std::string val;
665-
for (int cf = 0; cf < 3; ++cf) {
666-
for (int j = 0; j < 100; ++j) {
667-
val = Get(cf, Key(j));
668-
ASSERT_FALSE(val.empty());
669-
}
670-
}
671-
}
672-
673617
TEST_F(DBCompactionAbortTest, AbortDoesNotAffectFlush) {
674618
// Test that AbortAllCompactions does not affect flush operations
675619
Options options = CurrentOptions();
@@ -818,7 +762,7 @@ TEST_F(DBCompactionAbortTest, AbortWithInProgressFileCleanup) {
818762
if (pos != std::string::npos) {
819763
fname = fname.substr(pos + 1);
820764
}
821-
if (sscanf(fname.c_str(), "%lu", &file_num) == 1) {
765+
if (sscanf(fname.c_str(), "%" PRIu64, &file_num) == 1) {
822766
sst_file_numbers.push_back(file_num);
823767
}
824768
}

0 commit comments

Comments
 (0)