Skip to content

Commit

Permalink
Test this API only in ROCKSDB_ASSERT_STATUS_CHECKED mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jowlyzhang committed Sep 10, 2024
1 parent 0479da5 commit 93cc4cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/memtable_list.cc
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ Status MemTableList::TryInstallMemtableFlushResults(
// TODO(myabandeh): Not sure how batch_count could be 0 here.
if (batch_count > 0) {
VersionEdit edit;
#ifndef NDEBUG
#ifdef ROCKSDB_ASSERT_STATUS_CHECKED
if (memtables_to_flush.size() == memlist.size()) {
// TODO(yuzhangyu): remove this testing code once the
// `GetEditForDroppingCurrentVersion` API is used by the atomic data
Expand All @@ -598,7 +598,7 @@ Status MemTableList::TryInstallMemtableFlushResults(
#else
edit = GetDBRecoveryEditForObsoletingMemTables(
vset, *cfd, edit_list, memtables_to_flush, prep_tracker);
#endif /* !NDEBUG */
#endif // ROCKSDB_ASSERT_STATUS_CHECKED
TEST_SYNC_POINT_CALLBACK(
"MemTableList::TryInstallMemtableFlushResults:"
"AfterComputeMinWalToKeep",
Expand Down

0 comments on commit 93cc4cd

Please sign in to comment.