AcctIdx: grow data buckets to default size on creation (#20454)
This commit is contained in:
parent
d03bf2bbfe
commit
6ea96b3274
|
@ -1,7 +1,7 @@
|
|||
use crate::bucket_item::BucketItem;
|
||||
use crate::bucket_map::BucketMapError;
|
||||
use crate::bucket_stats::BucketMapStats;
|
||||
use crate::bucket_storage::{BucketStorage, Uid, UID_UNLOCKED};
|
||||
use crate::bucket_storage::{BucketStorage, Uid, DEFAULT_CAPACITY_POW2, UID_UNLOCKED};
|
||||
use crate::index_entry::IndexEntry;
|
||||
use crate::{MaxSearch, RefCount};
|
||||
use rand::thread_rng;
|
||||
|
@ -413,7 +413,7 @@ impl<T: Clone + Copy> Bucket<T> {
|
|||
&self.drives,
|
||||
self.index.max_search,
|
||||
self.data.get(data_index as usize),
|
||||
current_capacity_pow2 + 1,
|
||||
std::cmp::max(current_capacity_pow2 + 1, DEFAULT_CAPACITY_POW2),
|
||||
1 << data_index,
|
||||
Self::elem_size(),
|
||||
&self.stats.data,
|
||||
|
|
|
@ -29,7 +29,7 @@ use std::sync::Arc;
|
|||
23 8,388,608
|
||||
24 16,777,216
|
||||
*/
|
||||
const DEFAULT_CAPACITY_POW2: u8 = 5;
|
||||
pub const DEFAULT_CAPACITY_POW2: u8 = 5;
|
||||
|
||||
/// A Header UID of 0 indicates that the header is unlocked
|
||||
pub(crate) const UID_UNLOCKED: Uid = 0;
|
||||
|
|
Loading…
Reference in New Issue