Commit Graph

189 Commits

Author SHA1 Message Date
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
behzad nouri f67ecd5c18
removes unused Cargo dependencies (#22022)
Also moving some to [dev-dependencies] so that they are not propagated
to other packages which depend on the package.
2021-12-22 17:01:33 +00:00
Jeff Washington (jwash) 5b464a32f5
Disk Buckets: unlock verifies expected (#22052) 2021-12-21 16:35:59 -06:00
Jeff Washington (jwash) 1c0cd2cbb4
DiskBuckets: remove unnecessary atomic on uid (#22039) 2021-12-21 15:50:39 -06:00
Jeff Washington (jwash) b36f7151fc
Disk buckets: abstract UID_UNLOCKED (#22051) 2021-12-21 14:51:38 -06:00
Jeff Washington (jwash) 711856cad3
disk buckets: clone_from_slice -> copy_from_slice (#22038) 2021-12-21 13:52:03 -06:00
Jeff Washington (jwash) 84eaaae062
disk_buckets: factor out unsafe code (#22028) 2021-12-21 13:50:04 -06:00
Jeff Washington (jwash) 70f96bda25
disk buckets: refactor (#21972) 2021-12-17 10:16:34 -06:00
Jeff Washington (jwash) 6374995522
AcctIdx: share bucket map size for perf (#21935) 2021-12-16 21:25:54 -06:00
Trent Nelson d6f22433d0 Bump version to v1.10.0 2021-12-04 20:17:54 +00: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
Jeff Washington (jwash) f598ee696c
AcctIdx: disk bucket cleanup (#21520) 2021-12-01 12:17:32 -06:00
Michael Vines dd12d90eac Upgrade to Rust 2021 2021-11-30 20:43:46 -08:00
Jeff Washington (jwash) ebea3297f9
AcctIdx: generate index inserts/updates directly to disk (#21363)
* when initially creating account index, write directly to disk

* AcctIdx: generate index inserts/updates directly to disk
2021-11-19 17:17:07 -06:00
Jeff Washington (jwash) 4f6a0b2650
AcctIdx: stats for buckets on disk, add median (#20528) 2021-10-08 13:58:38 -05:00
Brooks Prumo 839edd35a4
Correctly constrain BucketStorage Header's memory ordering (#20507) 2021-10-07 13:32:40 -05:00
Trent Nelson 767f740305 Bump version to 1.9.0 2021-10-06 17:57:41 -07:00
Michael Vines 7027d56064 Resolve nightly-2021-10-05 clippy complaints 2021-10-06 10:37:58 -07:00
Jeff Washington (jwash) 18e47ab9f9
AcctIdx: remove duplicate mmap creation (#20453) 2021-10-06 00:58:25 +00:00
Jeff Washington (jwash) 6ea96b3274
AcctIdx: grow data buckets to default size on creation (#20454) 2021-10-05 19:16:02 -05:00
Jeff Washington (jwash) d03bf2bbfe
AcctIdx: metrics fixes (#20449) 2021-10-05 22:26:29 +00:00
Jeff Washington (jwash) 71ec05e2f6
AcctIdx: cleanup (#20443) 2021-10-05 19:59:08 +00:00
Jeff Washington (jwash) dc47a56c22
AcctIdx: bucket map grows with read lock (#20397) 2021-10-05 09:59:17 -05:00
Jeff Washington (jwash) 196cc8cfdf
AcctIdx: Remove unnecessary Arc (#20412) 2021-10-04 16:05:16 -05:00
Jeff Washington (jwash) cbf427228c
AcctIdx: misc cleanup (#20398) 2021-10-04 11:49:20 -05:00
Jeff Washington (jwash) 8da2eb980a
AcctIdx: introduce BucketApi for access to a specific bucket (#20359) 2021-10-04 11:48:09 -05:00
Jeff Washington (jwash) 5e05f12c48
AcctIdx: bucket perf improvements (#20328) 2021-09-30 01:53:26 +00:00
Brooks Prumo 72f5bfbae2
bucket_map: rename num_cells() to capacity() (#20150) 2021-09-24 01:08:06 +00:00
Tyera Eulberg 98af19bde3 Fix fmt 2021-09-23 13:39:53 -06:00
Jeff Washington (jwash) 254d9c8903
range takes a ref (#20140) 2021-09-23 13:57:56 -05:00
Jeff Washington (jwash) 476124de50
AcctIdx: report disk bucket stats (#20120) 2021-09-22 18:17:20 -05:00
dependabot[bot] 1b58166e9d
chore: bump memmap2 from 0.4.0 to 0.5.0 (#20057)
* chore: bump memmap2 from 0.4.0 to 0.5.0

Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.4.0 to 0.5.0.
- [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.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: memmap2
  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>
2021-09-21 17:20:49 -06:00
Brooks Prumo 52de97e280
Add type alias for Uid (#20075) 2021-09-21 20:09:04 +00:00
Brooks Prumo 0b6e9d861e
Remove unnecessary cfgs in bucket map (#20068) 2021-09-21 19:45:34 +00:00
Brooks Prumo c88fb6952c
Use a constant for unlocked header uid (#20048)
Instead of just a literal `0` for UID when the header is unlocked, make a constant to give additional context.
2021-09-21 08:53:26 -05:00
Brooks Prumo afa04f7abd
Fixup atomic ordering on BucketStorage Header (#20005)
Lock-type operations should be atomic::acquire, and unlock-type
operations should be atomic::release, so setting that here.

Additionally, change `unlock()` so it cannot fail.
2021-09-20 21:59:41 -05:00
Jeff Washington (jwash) 4716cd518d
bucketmap items_in_range does not return Option (#20036) 2021-09-20 17:18:12 +00:00
dependabot[bot] 6926d59d39
chore: bump memmap2 from 0.2.3 to 0.4.0 (#20031)
* chore: bump memmap2 from 0.2.3 to 0.4.0

Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.2.3 to 0.4.0.
- [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.2.3...v0.4.0)

---
updated-dependencies:
- dependency-name: memmap2
  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 <you@example.com>
2021-09-20 11:14:34 -06:00
Jeff Washington (jwash) d6d2840c94
add bucketmap 'insert' to eliminate copies (#20020) 2021-09-20 10:36:48 -05: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