Commit Graph

2053 Commits

Author SHA1 Message Date
Jeff Washington (jwash)
bed0049a51 AcctIdx: add age per item in in_mem acct idx (#19981) 2021-09-18 09:56:26 -05:00
Jeff Washington (jwash)
8df8f4396d AcctIdx: start calling flush on in mem cache buckets (#19966)
* AcctIdx: start calling flush on in mem cache buckets

* fix orderings
2021-09-18 09:56:08 -05:00
Jeff Washington (jwash)
4089f8b06b AcctIdx: with multiple bg threads, only log stats once per time interval (#19984) 2021-09-18 09:55:20 -05:00
Jeff Washington (jwash)
4e038e94fd add 'drives' to AccountsIndexConfig (#19989) 2021-09-18 09:54:57 -05:00
Jeff Washington (jwash)
f500c99a6d pass AcctIdxConfig to BucketMapHolder (#19997) 2021-09-18 09:54:00 -05:00
Jeff Washington (jwash)
bd86f41e18 acct idx tests use 2 bins instead of 8k (#19996) 2021-09-18 09:53:44 -05:00
Jeff Washington (jwash)
4dc2f08198 AcctIdx: hold_range_in_memory (#19955) 2021-09-17 22:19:29 +00:00
Jeff Washington (jwash)
24b136a993 AcctIdx: configurable flush threads (#19983) 2021-09-17 22:02:43 +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 b22f78e072.

Co-authored-by: Brooks Prumo <brooks@solana.com>
2021-09-17 15:11:27 -05:00
Jeff Washington (jwash)
cddb9da4f0 AcctIdx: central age functions/state (#19980) 2021-09-17 15:11:07 -05:00
Jeff Washington (jwash)
99f5684dc4 AcctIdx: handle future config defaults (#19967) 2021-09-17 13:12:06 -05:00
Jeff Washington (jwash)
9998e16df3 AcctIdx: prepare to spin up multiple bg threads (#19969) 2021-09-17 11:53:25 -05:00
Jack May
7b0bf64404 cleanup old features (#19956) 2021-09-17 09:46:49 -07:00
Jeff Washington (jwash)
37d6f5013f AcctIdx: initialize acct idx by config (#19968) 2021-09-17 16:39:41 +00:00
dependabot[bot]
b8106e2450 chore: bump memmap2 from 0.3.1 to 0.4.0 (#19974)
* chore: bump memmap2 from 0.3.1 to 0.4.0

Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.3.1 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.3.1...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-17 10:00:12 -06:00
Jeff Washington (jwash)
376b20c3d2 AcctIdx: add some bucket flush helpers (#19965) 2021-09-17 10:41:30 -05:00
Jeff Washington (jwash)
4d8b3aa578 AcctsIdx: introduce dirty state per pubkey (#19960) 2021-09-16 21:36:23 -05:00
Jeff Washington (jwash)
58f25a8752 AcctIdx: move background() to AccountsIndexStorage (#19948) 2021-09-16 17:52:06 -05:00
Jeff Washington (jwash)
66e0fafc21 AccountsIndexStorage holds InMemAccountsIndex[] (#19947) 2021-09-16 21:12:22 +00:00
sakridge
dc69cc1ae4 Only allow votes when root distance gets too high (#19917) 2021-09-16 15:12:26 +02:00
Jack May
bd434d92e1 nit: misspelling (#19929) 2021-09-16 01:27:26 +00:00
dependabot[bot]
fd60ef78eb chore: bump flate2 from 1.0.21 to 1.0.22 (#19863)
* chore: bump flate2 from 1.0.21 to 1.0.22

Bumps [flate2](https://github.com/rust-lang/flate2-rs) from 1.0.21 to 1.0.22.
- [Release notes](https://github.com/rust-lang/flate2-rs/releases)
- [Commits](https://github.com/rust-lang/flate2-rs/compare/1.0.21...1.0.22)

---
updated-dependencies:
- dependency-name: flate2
  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>
2021-09-15 14:30:30 -06:00
Jeff Washington (jwash)
eddd583cd5 AcctIdx: pass bins to BucketMapHolder (#19906) 2021-09-15 18:07:53 +00:00
Jeff Washington (jwash)
99f2c746d1 AcctIdx: Put InMemAcctIndex behind arc (#19904) 2021-09-15 17:36:08 +00:00
Jeff Washington (jwash)
b467e7fb3b AcctIdx: remove auto Debug trait (#19905) 2021-09-15 09:54:16 -05:00
Brooks Prumo
8e3c420414 Add logging after taking a bank snapshot (#19891) 2021-09-15 07:39:21 -05:00
Jeff Washington (jwash)
d3c80be7d5 AcctIdx: use stats() accessor (#19890) 2021-09-15 05:28:44 +00:00
Jeff Washington (jwash)
691bea8776 extract map to map() (#19883) 2021-09-14 23:08:17 -05:00
Jeff Washington (jwash)
229b378ed1 in-mem acct idx hash map uses rwlock (#19878) 2021-09-14 18:01:34 -05:00
Jeff Washington (jwash)
fc647eed19 introduce trait IndexValue for accounts index (#19859) 2021-09-14 17:51:07 -05:00
Brooks Prumo
21bc7e94f5 Add logging of incremental snapshots to purge_old_snapshot_archives() (#19874) 2021-09-14 17:49:15 -05:00
Jeff Washington (jwash)
60276da1fd rework acct idx entry to prepare for hashmap (#19875) 2021-09-14 15:27:23 -05:00
Jeff Washington (jwash)
2a795614d3 accounts index keys returns by value (#19858) 2021-09-14 09:38:59 -05:00
Jack May
00d7981f64 Fix native invoke writable privileges (#19750)
* Fix native invoke writable privileges

* build downstream spl bpf programs for tests
2021-09-13 22:57:37 -07:00
Jeff Washington (jwash)
910f241c3f add <T> through accounts index (#19852) 2021-09-13 22:59:03 -05:00
Jeff Washington (jwash)
b57e86abf2 cache account hash info (#19426)
* cache account hash info

* ledger_path -> accounts_hash_cache_path
2021-09-13 20:39:26 -05:00
Jeff Washington (jwash)
dca49a614f size and per-bin stats (#19842) 2021-09-13 19:26:49 -05:00
carllin
87a7f00926 Track reset bank in PohRecorder (#19810) 2021-09-13 16:55:35 -07:00
Brooks Prumo
3071c4caad Set is_startup=true for exhaustively_free_unused_resource() (#19846) 2021-09-13 18:08:06 -05:00
Jeff Washington (jwash)
e1a038e791 add stats inserts, deletes, updates_in_mem (#19807) 2021-09-13 15:59:01 -05:00
Brooks Prumo
ef749a2506 Flush accounts cache before calling clean_accounts() (#19839) 2021-09-13 14:56:13 -05:00
Jeff Washington (jwash)
c05226620f metrics on accounts index entry (#19806) 2021-09-13 08:33:45 -05:00
Brooks Prumo
3f6eb96d6e Call Bank::update_accounts_hash() before taking bank snapshot (#19765)
This is a bugfix.

When `load_frozen_forks()` called `snapshot_bank()`, the accounts hash
was not computed.  So then when a snapshot archive was eventually
created, its hash would be all 1s, which is clearly wrong.  The fix is
to update the bank's accounts hash before taking the bank snapshot.
2021-09-13 08:27:50 -05:00
Jeff Washington (jwash)
d388c5c257 move update_key_if_exists to InMemAccountsIndex (#19803) 2021-09-13 08:27:21 -05:00
Jeff Washington (jwash)
3cea535fdb InMemAccountsIndex::remove is no longer called (#19805) 2021-09-12 22:01:41 -05:00
Jeff Washington (jwash)
b992c02708 in_mem_accounts_index filters by range (#19779) 2021-09-12 21:57:15 -05:00
Jeff Washington (jwash)
0263ffb2ed move upsert and a handful of helpers to InMemAccountsIndex (#19799) 2021-09-12 21:54:09 -05:00
Jeff Washington (jwash)
3617d43e76 accounts index stats (#19797) 2021-09-12 22:14:59 +00:00
Jeff Washington (jwash)
d9674f7ff0 consolidate another use of remove_if_slot_list_empty (#19804) 2021-09-12 19:05:44 +00:00
Brooks Prumo
62c8bcf565 Add default() to SnapshotConfig (#19776) 2021-09-12 13:44:27 -05:00