Recover from PrevHashMismatch errors in recovery-range scanning.#175
Recover from PrevHashMismatch errors in recovery-range scanning.#175
PrevHashMismatch errors in recovery-range scanning.#175Conversation
| Ok(_) => {} | ||
| Err(chain::error::Error::Scan(ScanError::PrevHashMismatch { at_height })) => { | ||
| db_data | ||
| .truncate_to_height(at_height - 10) |
There was a problem hiding this comment.
This will break the internal state of the steady_state task. And given that it's supposed to be the steady_state task that handles reorgs, that suggests there is a different problem causing this bug. My current suspicion is unclean shutdown (I've seen this in a few different ways, such as #136).
There was a problem hiding this comment.
Hm, the error was at the chain tip as of when the node shut down; then, it was several hours later when I went to start the node back up. But I now note that the same error is possible in the steady state scanning, and it isn't handled there - previously I had only added the handling for this case in the initialize method.
Do we really need all three of these? Can the initialize case not be handled by the steady state scanning?
No description provided.