HaoranYi
1e56b88f59
Update index bucket after data bucket updated ( #33315 )
...
* typos
* update index bucket after data bucket
---------
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-09-20 11:12:42 -05:00
Jeff Washington (jwash)
5f58d2dd4a
add occupy_if_matches to bucket map ( #33318 )
2023-09-20 08:12:07 -07:00
Jeff Washington (jwash)
9b4feddb55
add PartialEq and Debug to bucket map ( #33043 )
2023-08-29 07:13:21 -07:00
Brooks
26809522b7
bucket_map: get_from_bytes should check alignment ( #31444 )
2023-05-02 15:17:36 -04:00
Brooks
1a6c75a115
bucket_map: Moves get_from_bytes() to index_entry.rs ( #31443 )
2023-05-02 16:58:16 +00:00
Brooks
bac1b2a584
bucket_map: Renames fns to get_slice and get_slice_mut ( #31442 )
2023-05-02 10:49:25 -04:00
Jeff Washington (jwash)
06461fb348
disk index: index files grow by bytes instead of doubling ( #31013 )
2023-04-05 06:30:37 -07:00
Jeff Washington (jwash)
9fb22bc0be
disk index: store ref_count in data file ( #30974 )
2023-04-04 19:17:48 -07:00
Jeff Washington (jwash)
fd28fd1d34
disk index: move capacity to contents ( #31040 )
2023-04-04 13:08:13 -07:00
Jeff Washington (jwash)
514816a31f
disk index: move key enum to bitvec ( #31026 )
2023-04-04 08:21:29 -07:00
Jeff Washington (jwash)
b0540ff5ad
disk index: add `Capacity` ( #31031 )
...
* disk index: add `Capacity`
* pr feedback
2023-04-04 06:57:09 -07:00
Jeff Washington (jwash)
05f2a01a80
disk index: refactor OccupiedEnumTag ( #31028 )
2023-04-03 13:12:06 -07:00
Jeff Washington (jwash)
f289a0726b
disk index: refactoring get/get_mut fns ( #31025 )
2023-04-03 11:40:49 -07:00
Jeff Washington (jwash)
7edef94088
disk index: remove Option on read_value ( #31023 )
2023-04-03 11:36:58 -07:00
Jeff Washington (jwash)
8051aea88e
disk index: store single slot list in index entry ( #31002 )
2023-04-03 06:51:59 -07:00
Jeff Washington (jwash)
fc2bcdffe2
fix up refcounts on disk bucket test ( #31001 )
2023-03-31 12:37:21 -07:00
Jeff Washington (jwash)
a2797ebfa9
disk index: use bits in ref count to store occupied ( #31004 )
2023-03-31 10:50:55 -07:00
Jeff Washington (jwash)
db5cdbedae
disk index remove dead code ( #30999 )
2023-03-31 09:08:16 -07:00
Jeff Washington (jwash)
3f6c33d7e2
disk index: break ref_count u64 into reserved bits ( #30997 )
2023-03-31 06:51:00 -07:00
Jeff Washington (jwash)
32780353c7
disk index: move fn data_loc to MultipleSlots ( #30993 )
...
disk index: move fn `data_loc` to `MultipleSlots`
2023-03-30 16:23:57 -07:00
Jeff Washington (jwash)
89f7d4ab9a
Move `data_bucket_ix()` method to `MultipleSlots` ( #30992 )
...
move data_bucket_ix to MultipleSlots
2023-03-30 13:20:10 -07:00
Jeff Washington (jwash)
b5afcbb72f
disk index: move num_slots() to MultipleSlots ( #30991 )
2023-03-30 12:39:15 -07:00
Jeff Washington (jwash)
2672637395
disk index: move fns to MultipleSlots ( #30989 )
2023-03-30 12:00:43 -07:00
Jeff Washington (jwash)
2cafd641fe
disk index: introduce MultipleSlots ( #30988 )
...
* disk index: introduce MultipleSlots
* pr feedback
2023-03-30 11:27:45 -07:00
Jeff Washington (jwash)
5ae3288a0b
disk index IndexEntry gets <T> ( #30984 )
...
* disk index IndexEntry gets <T>
* remove unused phantom
2023-03-30 09:23:51 -07:00
Jeff Washington (jwash)
e6ca734ac4
disk index: include T on a few structs ( #30983 )
2023-03-30 07:44:50 -07:00
Jeff Washington (jwash)
4b7cfa23c1
disk index: introduce IndexEntryPlaceInBucket ( #30944 )
...
* refactor: move data_bucket_from_num_slots
* disk index: introduce IndexEntryPlaceInBucket
* remove <T> from IndexEntryPlaceInBucket
* fix and comment index_bucket_for_testing
2023-03-29 13:41:10 -07:00
Jeff Washington (jwash)
6285aaee89
store data and index occupy in bitvec ( #30899 )
2023-03-28 12:17:28 -07:00
Jeff Washington (jwash)
89bc86f11a
use trait for disk bucket header ( #30875 )
...
* use trait for disk bucket header
* pr feedback
* remove debug and default
* as_mut_ptr
* add comments
* verify slice is large enough
2023-03-27 11:07:02 -07:00
Jeff Washington (jwash)
4285cb2b84
remove uid concept from disk buckets ( #30836 )
...
* remove uid concept from disk buckets
* remove uid parameter from try_lock
2023-03-22 06:30:44 -07:00
Jeff Washington (jwash)
d66d1f7a46
disk index handles empty slot list more correctly ( #30752 )
2023-03-16 12:34:45 -07:00
Michael Vines
b05c7d91ed
Fix derive_partial_eq_without_eq clippy lint
2022-05-22 22:22:21 -07:00
HaoranYi
e7e7e87c93
Fast log2 ceiling ( #24301 )
...
* typo
* a fast way to compute log2 ceiling
* rename and assert
* clippy
* fix test return 0 for empty slice
* add test for empty slice
2022-04-14 22:22:08 -05:00
Brooks Prumo
eaae2f3538
Use modular_bitfield to bitpack IndexEntry ( #22447 )
2022-01-12 14:37:34 -06:00
Jeff Washington (jwash)
b11d3b5abf
Shrink disk buckets index record ( #21973 )
...
* Shrink index record
* Update bucket_map/src/index_entry.rs
Co-authored-by: Brooks Prumo <brooks@prumo.org>
Co-authored-by: Brooks Prumo <brooks@prumo.org>
2022-01-07 12:12:36 -06:00
Jeff Washington (jwash)
5f611723a5
disk buckets: helpers and test ( #22339 )
2022-01-06 15:45:47 -06:00
Jeff Washington (jwash)
b36f7151fc
Disk buckets: abstract UID_UNLOCKED ( #22051 )
2021-12-21 14:51:38 -06:00
Jeff Washington (jwash)
70f96bda25
disk buckets: refactor ( #21972 )
2021-12-17 10:16:34 -06:00
Michael Vines
b8837c04ec
Reformat imports to a consistent style for imports
...
rustfmt.toml configuration:
imports_granularity = "One"
group_imports = "One"
2021-12-03 09:19:13 -08:00
Brooks Prumo
52de97e280
Add type alias for Uid ( #20075 )
2021-09-21 20:09:04 +00:00
Jeff Washington (jwash)
b2152be3b2
introduce bucket map ( #19848 )
...
* introduce bucket map
* rename BucketMap bits to num_buckets_pow2
* use u64::BITS
* Store the number of buckets in BucketMapConfig as a regular number
* remove redundant type aliases
* use Slot from sdk
* use Arc::clone() instead
* fixup erase drives
* rename num_buckets to max_buckets
* add doc to BucketMapConfig::new()
* add more documentation
* rename to DEFAULT_CAPACITY_POW2
* doc
* add more traits while we can
* rename capacity to capacity_pow2
* fix a naming for max_buckets_pow2
* remove unused/incorrect DataBucket::bytes
* rework benches a bit
* fixup bench docs
* rename create_bucket_capacity_pow2 to bucket_capacity_when_created_pow2
* rename BucketMapKeyValue to BucketItem
* rename to items_in_range
* remove values()
* remove addref and unref
* remove more addref and unref
* resurect addref and unref since tests use 'em for now
* rename to BucketStorage
* move stats in bucket_stats
* remove specializations (i don't think they are needed)
* move MaxSearch and RefCount into lib.rs
* move BucketItem to bucket_item.rs
* add doc
* keys no longer returns an option
* Revert "remove specializations (i don't think they are needed)"
This reverts commit b22f78e072cf0f7107851b08e58c2e3fead3f64d.
Co-authored-by: Brooks Prumo <brooks@solana.com>
2021-09-17 15:11:27 -05:00