Test the LOCAL_SNAPSHOTS_PRUNING_DELAY flag
Description
General tests for the LOCAL_SNAPSHOTS_PRUNING_DELAY flag.
- Test negative numbers.
- N is the current milestone, and N - DEPTH - PRUNING_DELAY should be oldest known milestone in DB.
- Run test multiple times and make sure it keeps consistent.
- Take into account asynchronicity, the pruner can take some time to actually delete.
- All milestones between N - DEPTH - PRUNING_DELAY and N - DEPTH are actually present in the DB.
All tests have passed with flying colors :-)
However I must reopen since @geminoz complains that it doesn't work on his machine. We need to understand why the discrepancy exists...
Confirmed. Even setting
LOCAL_SNAPSHOTS_ENABLED = true
LOCAL_SNAPSHOTS_PRUNING_ENABLED = true
LOCAL_SNAPSHOTS_PRUNING_DELAY = 3
I do not see the database getting compacted (running for 14 hours with this configuration, ran with LOCAL_SNAPSHOTS_PRUNING_DELAY = 2000 for a couple of weeks, same result).
Happy to provide all necessary tools and data to replicate the event.
A small note: the comment above ^ is referring to my assumption that the compaction of the database is regulated by those three settings of course.
I don't think compaction is handled this deterministically right now with the rocksDB implementation. https://github.com/iotaledger/iri/issues/967
Confirmed with Andrea, this is a non-issue. The current behaviour is expected.