Add option to retain rather than truncate ledger files on rollback #2197
Unanswered
eddyashton
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Following #2192, we've discussed what we do with uncommitted ledger files on rollback. Currently the rolled back entries are deleted - a partial chunk file is truncated, and any completely rolled back chunk is deleted. There are various reasons that this behaviour may not be what the operator wants:
These chunks should never need to be read by a node, but may be used and manipulated by operators.
So we need to:
ledger.h
to create copies of these files during truncationThe files need some per-rollback unique ID, since it is possible to have multiple rollbacks for the same index range and we want to keep them all. The obvious solution here is to use the
view
in the filenames.We've discussed several possible filename suffixes, trying to describe precisely what these files contain while making it clear that they're non-critical for normal ledger operation. The current favourite is
.rolled_back.<view>.<seqno>
, so an unlucky ledger directory might look like (sorted by last-write time):If anyone has thoughts on this naming scheme (better terms than
rolled_back
, parsing/sorting problems with the element order), please discuss them below.Beta Was this translation helpful? Give feedback.
All reactions