diff --git a/accounts-db/src/accounts_index.rs b/accounts-db/src/accounts_index.rs index ff430931c9ec48..f90168aeeccd59 100644 --- a/accounts-db/src/accounts_index.rs +++ b/accounts-db/src/accounts_index.rs @@ -1730,7 +1730,7 @@ impl + Into> AccountsIndex { // this assumes the largest bin contains twice the expected amount of the average size per bin let bins = self.bins(); let expected_items_per_bin = approx_items_len * 2 / bins; - let use_disk = self.storage.storage.disk.is_some(); + let use_disk = self.storage.storage.is_disk_index_enabled(); let mut binned = (0..bins) .map(|_| Vec::with_capacity(expected_items_per_bin)) .collect::>(); diff --git a/accounts-db/src/bucket_map_holder.rs b/accounts-db/src/bucket_map_holder.rs index 8a6fb5028c1060..b37e58e4872321 100644 --- a/accounts-db/src/bucket_map_holder.rs +++ b/accounts-db/src/bucket_map_holder.rs @@ -134,7 +134,7 @@ impl + Into> BucketMapHolder /// return when the bg threads have reached an 'idle' state pub fn wait_for_idle(&self) { assert!(self.get_startup()); - if self.disk.is_none() { + if !self.is_disk_index_enabled() { return; } @@ -315,7 +315,7 @@ impl + Into> BucketMapHolder can_advance_age: bool, ) { let bins = in_mem.len(); - let flush = self.disk.is_some(); + let flush = self.is_disk_index_enabled(); let mut throttling_wait_ms = None; loop { if !flush {