iri icon indicating copy to clipboard operation
iri copied to clipboard

Test the LOCAL_SNAPSHOTS_PRUNING_DELAY flag

Open jakubcech opened this issue 8 years ago • 6 comments

Description

General tests for the LOCAL_SNAPSHOTS_PRUNING_DELAY flag.

  1. Test negative numbers.
  2. 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. 
  3. All milestones between N - DEPTH - PRUNING_DELAY and N - DEPTH are actually present in the DB.

jakubcech avatar Nov 19 '18 17:11 jakubcech

All tests have passed with flying colors :-)

GalRogozinski avatar Dec 18 '18 19:12 GalRogozinski

However I must reopen since @geminoz complains that it doesn't work on his machine. We need to understand why the discrepancy exists...

GalRogozinski avatar Dec 18 '18 19:12 GalRogozinski

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.

geminoz avatar Dec 19 '18 02:12 geminoz

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.

geminoz avatar Dec 19 '18 02:12 geminoz

I don't think compaction is handled this deterministically right now with the rocksDB implementation. https://github.com/iotaledger/iri/issues/967

jakubcech avatar Dec 19 '18 07:12 jakubcech

Confirmed with Andrea, this is a non-issue. The current behaviour is expected.

geminoz avatar Dec 19 '18 13:12 geminoz