lighthouse/beacon_node/store/src
Michael Sproul a60ab4eff2 Refine compaction (#1916)
## Proposed Changes

In an attempt to fix OOM issues and database consistency issues observed by some users after the introduction of compaction in v0.3.4, this PR makes the following changes:

* Run compaction less often: roughly every 1024 epochs, including after long periods of non-finality. I think the division check proposed by Paul is pretty solid, and ensures we don't miss any events where we should be compacting. LevelDB lacks an easy way to check the size of the DB, which would be another good trigger.
* Make it possible to disable the compaction on finalization using `--auto-compact-db=false`
* Make it possible to trigger a manual, single-threaded foreground compaction on start-up using `--compact-db`
* Downgrade the pruning log to `DEBUG`, as it's particularly noisy during sync

I would like to ship these changes to affected users ASAP, and will document them further in the Advanced Database section of the book if they prove effective.
2020-11-17 09:10:53 +00:00
..
impls Write new blocks and states to the database atomically (#1285) 2020-07-01 12:45:57 +10:00
chunked_iter.rs Make key value storage abstractions more accurate (#1267) 2020-06-16 11:34:04 +10:00
chunked_vector.rs Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
config.rs Refine compaction (#1916) 2020-11-17 09:10:53 +00:00
errors.rs Add database schema versioning (#1688) 2020-10-01 11:12:36 +10:00
forwards_iter.rs Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
garbage_collection.rs Compact database on finalization (#1871) 2020-11-09 07:02:21 +00:00
hot_cold_store.rs Refine compaction (#1916) 2020-11-17 09:10:53 +00:00
impls.rs Clean up database abstractions (#1200) 2020-06-01 08:13:49 +10:00
iter.rs Make key value storage abstractions more accurate (#1267) 2020-06-16 11:34:04 +10:00
leveldb_store.rs Compact database on finalization (#1871) 2020-11-09 07:02:21 +00:00
lib.rs Compact database on finalization (#1871) 2020-11-09 07:02:21 +00:00
memory_store.rs Compact database on finalization (#1871) 2020-11-09 07:02:21 +00:00
metadata.rs Refine compaction (#1916) 2020-11-17 09:10:53 +00:00
metrics.rs Write new blocks and states to the database atomically (#1285) 2020-07-01 12:45:57 +10:00
partial_beacon_state.rs Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
schema_change.rs Implement database temp states to reduce memory usage (#1798) 2020-10-23 01:27:51 +00:00