Closed Longarithm closed 3 months ago
I would propose the following:
TAIL <= flat head
. This can be enforced by not allowing garbage collection to go beyond the flat head. Move the flat head to the final block, unless it is locked
Strictly speaking, flat head can be moved too far before snapshotting is triggered. This is because arbitrary number of chunks in the end of epoch can be missing.
Strictly speaking, flat head can be moved too far before snapshotting is triggered. This is because arbitrary number of chunks in the end of epoch can be missing.
Ah I see. What do we do about it today? Is this the reason why we don't move the flat head on empty chunks? Would it make sense to always move the flat head to the latest new chunk (barring the other invariants)?
fixed in #11599
...if the shard has 0 validators and 0 tx&receipts load. We discussed this issue around here: https://near.zulipchat.com/#narrow/stream/308695-nearone.2Fprivate/topic/Statelessnet.20new.20release/near/444673576. We observed specifically that ChunkExtra is missing, which is required to load memtrie.
Two possible solutions:
clear_data
, when gc stop height is determined, all flat storage heads must be moved above that height. If this is not possible for some reason,clear_data
should be no-op at this iteration;cc @wacban