Skip to content

Commit

Permalink
feat(split-storage): crash on startup if the hot and cold are inconsi…
Browse files Browse the repository at this point in the history
…stent (#10410)

In the recent split archival incident the nodes were bootstrapped with
inconsistent hot and cold DBs. In such a case the node should crash
immediately on startup so that the issue can be detected as early as
possible.
* Refactored the sanity check code to two new methods
* Added the sanity check before the cold loop is spawned - at this place
it would crash the node if failed
* Note that once the loop is spawned the sanity check doesn't crash the
node but prints an error message and bumps approproate metric - this
part remained unchanged. I'm open to suggestions here.

I'm also refactoring the cold storage tests becuase it's a pain to work
with those. Dear reviewers if you prefer to review those separately I'm
happy to move it to a new PR, just let me know.
* moving create_tx_* logic to dedicated methods
* moving inlined arguments into helper variables with nice names and
reducing the total line count
* renaming some variables (h->height, store -> storage)
  • Loading branch information
wacban committed Jan 12, 2024
1 parent 9fc06ac commit ac967f6
Show file tree
Hide file tree
Showing 2 changed files with 180 additions and 192 deletions.
Loading

0 comments on commit ac967f6

Please sign in to comment.