Commit Graph

446 Commits

Author SHA1 Message Date
Brooks Prumo 5788973153
Constrain memory ordering on AccountStorageEntry::alive_bytes (#21309) 2021-11-18 20:34:08 -06:00
Jeff Washington (jwash) 9cb74e8421
remove store_cached stall (#21326) 2021-11-17 18:30:40 -06:00
Jeff Washington (jwash) 0f69a14247
Add ability to abort scan (#21314) 2021-11-17 13:10:29 -06:00
Brooks Prumo c3e5927d16
Constrain memory ordering on AccountsDb::write_version (#21312) 2021-11-17 07:11:16 -06:00
Jeff Washington (jwash) 39340ed25b
throttle store_cached when cache size is too large (#21188)
* throttle store_cached when cache size is too large

* reduce max delay

* 100ms max

* 10ms max delay
2021-11-13 14:00:37 -06:00
Jeff Washington (jwash) 171243a370
add rent exempt count to get_total_accounts_stats (#21153) 2021-11-04 11:17:19 -05:00
Jeff Washington (jwash) 76e533be46
LoadedAccountAccessor::Cached does not store Pubkey (#21030) 2021-11-04 10:28:04 -05:00
Jeff Washington (jwash) b1e3a82c11
refactor rent collector and logs (#21155) 2021-11-04 06:28:41 -05:00
Jeff Washington (jwash) c59c56c0f8
log rent exempt accounts (#21137) 2021-11-03 14:44:52 -05:00
Jeff Washington (jwash) c0952831be
correctly clean filler accounts (#21139) 2021-11-03 11:27:15 -05:00
Jeff Washington (jwash) 7a41b2c5d1
optimize get_accounts_delta_hash (#21027) 2021-10-28 10:40:32 -05:00
Jeff Washington (jwash) e9ab214237
filler accts: only add filler accts to slots in the current epoch (#21024) 2021-10-28 10:26:30 -05:00
Jeff Washington (jwash) 9d330fc638
FillerAccts: use variable cycle partitions (#20963) 2021-10-27 11:18:27 -05:00
Lijun Wang bbe3ce3db5
Accountsdb plugin write ordering (#20948)
Use the write_version in the Accounts's meta data so that account write with lower write_version would not overwrite the higher ones.
2021-10-25 14:07:56 -07:00
Jeff Washington (jwash) 9e85499d4c
fix hash calc # storages, # slots (#20832) 2021-10-25 19:37:50 +00:00
Jeff Washington (jwash) 43ea579f63
add cli for --accounts-hash-num-passes (#20827) 2021-10-25 09:45:46 -05:00
Lijun Wang f14365f4b4
Accountsdb plugin postgres -- bulk insertion at startup (#20763)
Use bulk insertion to Postgres at startup to reduce time taken for initial snapshot restore for postgres plugin. Avoid duplicate writes of accounts at startup. Doing account plugin notification and indexing in parallel.

Improved error handling for postgres plugin to show the real db issues for debug purpose
Added more metrics for postgres plugin.
Refactored plugin centric code out to a sub module from accounts_db and added unit tests
2021-10-24 12:43:33 -07:00
Jeff Washington (jwash) 47a58a38c2
clean_accounts calls AcctIdx: get_many (#20715)
* AcctIdx: get_many

* keep read lock

* AcctIdx: get_many optionally adds to cache

* rename
2021-10-19 15:54:06 -05:00
Michael Vines 2b76ea51b4 Reduce visibility of `Hash` struct contents 2021-10-19 09:30:47 -07:00
Jeff Washington (jwash) 46bf7d4a4a
AcctIdx: support 2^24 bins (#20739) 2021-10-18 14:05:16 -05:00
Jeff Washington (jwash) 6ec159a1ae
parallelize update_index (#20601) 2021-10-18 09:07:01 -05:00
Jeff Washington (jwash) 0d934d311e
sort shrink acct indexes (#20708) 2021-10-18 09:06:32 -05:00
Jeff Washington (jwash) 70b2e5fef2
hash calc uses all threads during startup (#20735) 2021-10-15 17:41:23 -05:00
Jeff Washington (jwash) 254ad45878
sort pubkeys for clean (#20706) 2021-10-15 14:31:06 -05:00
Jeff Washington (jwash) 6d7da6dbee
clean:clone uncleaned_roots for loop (#20714) 2021-10-15 13:18:00 -05:00
Jeff Washington (jwash) 1e064c32e2
pull append_vec_id() out of loop (#20713) 2021-10-15 10:41:23 -05:00
Jeff Washington (jwash) 00b9056004
clean metric: total_us (#20707) 2021-10-15 10:41:05 -05:00
Jeff Washington (jwash) 7eead4e25f
clean stats on acct idx lookup (#20632) 2021-10-14 08:37:42 -05:00
Jeff Washington (jwash) c43b6e0248
log metric for clean_accounts.delta_insert_us (#20634) 2021-10-14 08:37:14 -05:00
Jeff Washington (jwash) aec9d8bf2f
add clean stats (#20631) 2021-10-13 08:22:11 -05:00
Jeff Washington (jwash) a8e000a2a6
add filler accounts to bloat validator and predict failure (#20491)
* add filler accounts to bloat validator and predict failure

* assert no accounts match filler

* cleanup magic numbers

* panic if can't load from snapshot with filler accounts specified

* some renames

* renames

* into_par_iter

* clean filler accts, too
2021-10-11 12:46:27 -05:00
Jeff Washington (jwash) df39b37cb8
improve clean stats (#20469) 2021-10-06 20:04:26 -05:00
Michael Vines 7027d56064 Resolve nightly-2021-10-05 clippy complaints 2021-10-06 10:37:58 -07:00
Jeff Washington (jwash) 895b46e0c3
simplify AccountsDb::new_with_config (#20473) 2021-10-06 11:41:23 -05:00
Jeff Washington (jwash) 64cf354651
Add clean metrics (#20410) 2021-10-04 18:21:45 -05:00
Jeff Washington (jwash) 2d78f8ad2a
parallelize unref_from_storage from clean_dead_slots_from_accounts_index (#20411) 2021-10-04 18:20:10 -05:00
Jeff Washington (jwash) b6a6d6986d
lift store.slot() from loop (#20409) 2021-10-04 16:07:01 -05:00
Lijun Wang fe97cb2ddf
AccountsDb plugin framework (#20047)
Summary of Changes

Create a plugin mechanism in the accounts update path so that accounts data can be streamed out to external data stores (be it Kafka or Postgres). The plugin mechanism allows

Data stores of connection strings/credentials to be configured,
Accounts with patterns to be streamed
PostgreSQL implementation of the streaming for different destination stores to be plugged in.

The code comprises 4 major parts:

accountsdb-plugin-intf: defines the plugin interface which concrete plugin should implement.
accountsdb-plugin-manager: manages the load/unload of plugins and provide interfaces which the validator can notify of accounts update to plugins.
accountsdb-plugin-postgres: the concrete plugin implementation for PostgreSQL
The validator integrations: updated streamed right after snapshot restore and after account update from transaction processing or other real updates.
The plugin is optionally loaded on demand by new validator CLI argument -- there is no impact if the plugin is not loaded.
2021-09-30 14:26:17 -07:00
Jeff Washington (jwash) 9d91a6f1b7
shrink slots at startup uses more threads (#20251) 2021-09-27 14:14:55 -05:00
Brooks Prumo 1347b507da
Handle duplicate AppendVec IDs (#20096)
When reconstructing the AccountsDb, if the storages came from full and
incremental snapshots generated on different nodes, it's possible that
the AppendVec IDs could overlap/have duplicates, which would cause the
reconstruction to fail.

This commit handles this issue by unconditionally remapping the
AppendVec ID for every AppendVec.

Fixes #17088
2021-09-23 17:34:32 -05:00
Jeff Washington (jwash) 742155c214
call set_startup and add metrics on generate_index (#20006) 2021-09-18 22:08:58 -05:00
Jeff Washington (jwash) fc647eed19
introduce trait IndexValue for accounts index (#19859) 2021-09-14 17:51:07 -05:00
Jeff Washington (jwash) 2a795614d3
accounts index keys returns by value (#19858) 2021-09-14 09:38:59 -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
Brooks Prumo ef749a2506
Flush accounts cache before calling clean_accounts() (#19839) 2021-09-13 14:56:13 -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) 91c3b18e1e
InMemAccountsIndex iter returns vec<owned> (#19778) 2021-09-11 20:33:04 +00:00
Jeff Washington (jwash) 2de2c6ddd7
log accounts loaded for shrink stats (#19747) 2021-09-10 12:51:58 -05:00
Jeff Washington (jwash) 97418bede3
introduce BinnedHashData type to improve some code readability (#19722) 2021-09-08 19:25:52 -05:00
Jeff Washington (jwash) 001ed66b4d
minor constant cleanup (#19721) 2021-09-08 18:26:10 -05:00