From 36fea44b6056d2692be22509c49619a28141e29d Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" Date: Thu, 18 Aug 2022 10:35:22 -0500 Subject: [PATCH] add an assert for a debug feature to avoid wasted time (#27210) --- runtime/src/accounts_db.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index 4c789751a2405d..03d343f0ac18a2 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -6895,6 +6895,11 @@ impl AccountsDb { stats.oldest_root = storages.range().start; + assert!( + !(config.store_detailed_debug_info_on_failure && config.use_write_cache), + "cannot accurately capture all data for debugging if accounts cache is being used" + ); + self.mark_old_slots_as_dirty(storages, Some(config.epoch_schedule.slots_per_epoch)); let (num_hash_scan_passes, bins_per_pass) = Self::bins_per_pass(self.num_hash_scan_passes);