Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(gc) - fix the chunk_tail <= tail invariant (#12207)
According to this line in the storage checker, the chunk tail should always be less or equal than the tail: https://github.com/near/nearcore/blob/99ecfa4e8b97eda5e369d82ef00cfc06e5291552/chain/chain/src/store_validator/validate.rs#L146 This invariant is broken, I'm guessing since #12025 as shown by nayduck gc test failing at this check: https://nayduck.nearone.org/#/test/108874 - test1 stderr last line This is a simple mitigation but I'm not 100% sure if correct - please let me know if it makes sense or not. Even if not entirely correct it should not cause any problems. At worst gc will attempt to clean a little bit more data that isn't there. I hope. The only real change here is the added `saturating_sub(1)` to the line where we set the tail.
- Loading branch information