Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(split-storage): crash on startup if the hot and cold are inconsi…
…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