Commit Graph

189 Commits

Author SHA1 Message Date
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) aa3e0b9c20
disk index: add stat: disk_index_failed_resizes (#31039) 2023-04-04 09:39:06 -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) bc343a431c
disk index: set_anticipated_count to optimally grow disk buckets at startup (#31033)
* disk index: set_anticipated_count to optimally grow disk buckets at startup

* remove atomic
2023-04-03 20:28:50 -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) ef6b6793dd
disk bucket: add trait fn copying_entry (#31024) 2023-04-03 11:35:15 -07:00
Jeff Washington (jwash) 9219a16c42
disk bucket: new_map takes bytes (#31020) 2023-04-03 06:57:06 -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
Brooks 399b7ba722
Removes unnecessary Sized bounds in bucket map (#30990) 2023-03-30 16:34:59 -04: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
Brooks eb47e44c6b
disk bucket: refactor storage get/get_mut fns (#30985) 2023-03-30 12:38:35 -04: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) 38e054f4a6
disk bucket: get mut right on get_mut_cell_slice (#30972) 2023-03-30 05:19:29 -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) 97af6aad4a
remove unused bucket map direct add/unref calls (#30942) 2023-03-29 10:26:53 -07:00
Jeff Washington (jwash) 823d55ea9f
disk index find_entry -> find_index_entry (#30941) 2023-03-29 06:54:03 -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) b54c2cc1e3
refactor disk index bucket::find_entry_mut (#30877) 2023-03-23 18:48:35 -07:00
Jeff Washington (jwash) 9f3381c771
disk bucket allocated bit can be not in header (#30834) 2023-03-22 15:11:35 -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) d4a6e00ffc
rework find_entry_mut for missing case (#30833)
* rework find_entry_mut for missing case

* clippy
2023-03-21 14:09:17 -07:00
Jeff Washington (jwash) df2c95119c
add buckets stats for # files and total file size (#30780)
* add buckets stats for # files and total file size

* change metrics to bytes

* get index file size correct
2023-03-20 08:22:31 -07:00
Jeff Washington (jwash) 6dd5a22926
when writing to disk bucket index, tune towards packing tighter (#30761)
* when writing to disk bucket index, tune towards packing tighter

* switch to min
2023-03-17 12:34:56 -07:00
Jeff Washington (jwash) d66d1f7a46
disk index handles empty slot list more correctly (#30752) 2023-03-16 12:34:45 -07:00
Jeff Washington (jwash) 2441a06e78
drop default from PhantomData::default() (#30476) 2023-02-23 14:59:08 -08:00
Yihau Chen df3ef111f7
chore: workspace inheritance (#29893)
* introduce workspace.package

* introduce workspace.dependencies

* read version from root cargo.toml

* pass check when version = { workspace = true }

* don't bump version when version = { workspace = true }

* including workspace Cargo.toml when bump version

* programs/sbf use workspace inheritance

* fix increasing cargo version ignore program/sbf/Cargo.toml
2023-02-23 22:01:54 +08:00
Michael Vines 5136ed3448
Update homepage value for all crates (#30444) 2023-02-23 02:20:18 +00:00
Jeff Washington (jwash) 1269011477
bucket map try_write takes iter (#30440) 2023-02-22 14:43:10 -08:00
Will Hickey 04a6a631bc
Bump version to v1.16 (#30028) 2023-01-31 17:48:33 -06:00
joeaba a12bf8c003
Update maintainers references (#29997)
* update maintainers references

* chore: update maintainers reference
2023-01-31 08:07:13 -05:00
Yihau Chen 9193b4221d
Revert "chore: workspace inheritance (#29509)" (#29892)
This reverts commit a67d239dde.
2023-01-25 15:50:41 +08:00
Yihau Chen a67d239dde
chore: workspace inheritance (#29509)
* introduce workspace.package

* introduce workspace.dependencies

* read version from root cargo.toml

* pass check when version = { workspace = true }

* don't bump version when version = { workspace = true }

* including workspace Cargo.toml when bump version

* programs/sbf use workspace inheritance

* fix increasing cargo version ignore program/sbf/Cargo.toml
2023-01-25 13:59:59 +08:00
dependabot[bot] 10f8b5faa3
Bump memmap2 from 0.5.3 to 0.5.8 (#29674)
* Bump memmap2 from 0.5.3 to 0.5.8

Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.5.3 to 0.5.8.
- [Release notes](https://github.com/RazrFalcon/memmap2-rs/releases)
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.3...v0.5.8)

---
updated-dependencies:
- dependency-name: memmap2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-01-12 19:38:38 -07:00
HaoranYi d3daea65b9
use atomicu64 for bucket maxsize instead of lock (#29569) 2023-01-10 09:15:27 -06:00
HaoranYi aa3aa5cc9c
extract max_size stat update for disk buckets (#29487) 2023-01-07 09:25:04 -06:00
behzad nouri 5c9beef498
fixes errors from clippy::useless_conversion (#29534)
https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
2023-01-05 18:05:32 +00:00
HaoranYi 95ecd38af5
typo (#29485) 2023-01-03 13:32:45 -06:00
HaoranYi 33b15240ac
Revert #28945 (#29127)
revert #28945
2022-12-06 17:08:56 -06:00
behzad nouri 9524c9dbff patches errors from clippy::uninlined_format_args
https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
2022-12-06 19:32:15 +00:00
behzad nouri 401f66c830 patches errors from clippy::seek_to_start_instead_of_rewind
https://rust-lang.github.io/rust-clippy/master/index.html#seek_to_start_instead_of_rewind
2022-12-06 19:32:15 +00:00
Haoran Yi bbd49acb2f fix merge error 2022-12-06 13:31:50 -06:00
haoran 824473a3a5 comments 2022-12-06 13:31:50 -06:00
haoran 7a512d7f27 report number of open files 2022-12-06 13:31:50 -06:00
haoran f716cad4af don't use procfs as it is not supported on mac and windows.
make open_fd stats only on linux platform
2022-12-06 13:31:50 -06:00
haoran 6c613e3a39 wc-l-copy 2022-12-06 13:31:50 -06:00
haoran 2e078bb42c alternative impl 2022-12-06 13:31:50 -06:00
haoran fc97d818b6 share code 2022-12-06 13:31:50 -06:00
haoran 5aadaa4172 clippy 2022-12-06 13:31:50 -06:00
haoran 36dc3a457f get mmap with wc-l 2022-12-06 13:31:50 -06:00
haoran 75fc87f330 review feedbacks 2022-12-06 13:31:50 -06:00
Haoran Yi 37306f1762 log mmap count 2022-12-06 13:31:50 -06:00
Haoran Yi 703511c3e8 log number of open files when panic 2022-12-06 13:31:50 -06:00
apfitzge 42cc76e33d
use a tempdir in test_bucket_storage (#28819) 2022-11-15 14:26:19 -06:00
Brooks Prumo d1ba42180d
clippy for rust 1.65.0 (#28765) 2022-11-09 19:39:38 +00:00
behzad nouri 9a57c64f21
patches clippy errors from new rust nightly release (#27996) 2022-09-22 22:23:03 +00:00
Will Hickey c0e4379f43
Whickey/version v1.15 (#27739)
* Bump version to v1.13.0
* Bump version to v1.14.0
* Bump version to v1.15.0
2022-09-13 09:06:15 -05:00
Will Hickey ed8c224374
Bump version to v1.12 (#26967) 2022-08-06 13:20:30 -05:00
github-actions[bot] fbf1bf6d86
Bump Version to 1.11.6 (#26906)
Co-authored-by: willhickey <willhickey@users.noreply.github.com>
2022-08-03 12:48:43 -05:00
Jeff Washington (jwash) 4d15e774ee
insert perf improvement on bucket map (#26754)
perf on bucket map
2022-07-29 13:58:05 -05:00
Jeff Washington (jwash) 6f5995c841
add stats for disk_index_find_entry_mut_us (#26753) 2022-07-25 14:47:17 -05:00
github-actions[bot] 5d038b9d2a
Bump Version to 1.11.5 (#26758)
Co-authored-by: willhickey <willhickey@users.noreply.github.com>
2022-07-25 13:05:14 -06:00
github-actions[bot] fd5df1cf25
Bump Version to 1.11.4 (#26578)
Co-authored-by: willhickey <willhickey@users.noreply.github.com>
2022-07-11 23:30:38 -05:00
behzad nouri ba785cf8ab
removes erroneous uses of std::mem::swap (#26536)
All instances should be replace by std::mem::{replace,take},
or just plain assignment.
2022-07-11 11:33:15 +00:00
HaoranYi 995756a550
Use RefCount type alias instead of u64 (#26472)
use RefCount type alias instead of u64
2022-07-08 13:51:16 -05:00
github-actions[bot] 9d937fb8a0
Bump Version to 1.11.3 (#26481)
Co-authored-by: willhickey <willhickey@users.noreply.github.com>
2022-07-07 14:39:46 -05:00
github-actions[bot] 5c2f819f99
Bump Version to 1.11.2 (#26159) 2022-06-22 21:16:18 -05:00
Will Hickey 51f26dc96e
Bump version to 1.11.1 (#26104) 2022-06-21 12:07:46 -05:00
Michael Vines b05c7d91ed Fix derive_partial_eq_without_eq clippy lint 2022-05-22 22:22:21 -07:00
dependabot[bot] 542bd0ec3c
chore: bump rayon from 1.5.2 to 1.5.3 (#25242)
* chore: bump rayon from 1.5.2 to 1.5.3

Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.5.2 to 1.5.3.
- [Release notes](https://github.com/rayon-rs/rayon/releases)
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/v1.5.2...v1.5.3)

---
updated-dependencies:
- dependency-name: rayon
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-05-18 09:39:57 -06:00
dependabot[bot] bece7f32c8
chore: bump log from 0.4.16 to 0.4.17 (#24987)
* chore: bump log from 0.4.16 to 0.4.17

Bumps [log](https://github.com/rust-lang/log) from 0.4.16 to 0.4.17.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/commits/0.4.17)

---
updated-dependencies:
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-05-05 01:49:18 +00:00
dependabot[bot] dd15193c69
chore: bump rayon from 1.5.1 to 1.5.2 (#24470)
* chore: bump rayon from 1.5.1 to 1.5.2

Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.5.1 to 1.5.2.
- [Release notes](https://github.com/rayon-rs/rayon/releases)
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/commits)

---
updated-dependencies:
- dependency-name: rayon
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-04-19 23:17:52 -06: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
Will Hickey c4ecfa5716
Bump version to v1.11 (#23807)
* Revert crossbeam_epoch to stable. 0.9.8 only works with nightly
* Remove unneeded unit expression
2022-03-21 17:40:50 -05:00
Will Hickey 2f58c9e501
Bump version to 1.10.4 (#23743) 2022-03-17 14:02:13 -05:00
Will Hickey 63bf0f66af
Bump version to 1.10.3 (#23648) 2022-03-14 11:18:45 -05:00
Brooks Prumo d20dd21600
Sort tables in Cargo.toml files (#23602) 2022-03-11 11:05:57 -06:00
Will Hickey b444836a97
Bump version to 1.10.2 (#23597) 2022-03-10 16:41:06 -06:00
dependabot[bot] afda8c4020
chore: bump memmap2 from 0.5.2 to 0.5.3 (#23475)
* chore: bump memmap2 from 0.5.2 to 0.5.3

Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.5.2 to 0.5.3.
- [Release notes](https://github.com/RazrFalcon/memmap2-rs/releases)
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.2...v0.5.3)

---
updated-dependencies:
- dependency-name: memmap2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <you@example.com>
2022-03-03 14:45:07 -07:00
Will Hickey 1a99251498
Bump version to 1.10.1 (#23453) 2022-03-02 13:47:01 -06:00
Brooks Prumo eaae2f3538
Use modular_bitfield to bitpack IndexEntry (#22447) 2022-01-12 14:37:34 -06:00
dependabot[bot] 157f165a3d
Bump memmap2 from 0.5.1 to 0.5.2 (#22414)
* Bump memmap2 from 0.5.1 to 0.5.2

Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.5.1 to 0.5.2.
- [Release notes](https://github.com/RazrFalcon/memmap2-rs/releases)
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.1...v0.5.2)

---
updated-dependencies:
- dependency-name: memmap2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-01-11 15:08:13 -07:00
dependabot[bot] 04a2c19c87
Bump memmap2 from 0.5.0 to 0.5.1 (#22409)
* Bump memmap2 from 0.5.0 to 0.5.1

Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/RazrFalcon/memmap2-rs/releases)
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.0...v0.5.1)

---
updated-dependencies:
- dependency-name: memmap2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-01-10 11:14:56 -07:00
dependabot[bot] 28275a33d6
Bump tempfile from 3.2.0 to 3.3.0 (#22401)
* Bump tempfile from 3.2.0 to 3.3.0

Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/Stebalien/tempfile/releases)
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-01-09 12:26:08 -07: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) 2be139ca61
Disk Buckets: cleanup api (is_free) (#22068) 2021-12-22 15:12:34 -06:00