Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kv: initialize consistencyLimiter during Store construction, before S…
…tart Fixes #96231. This commit attempts to fix #96231. It moves the initialization of `Store.consistencyLimiter` up from the bottom of `Store.Start` into `NewStore`. It is unsafe to initialize this variable after the call to `Store.processRaft`, which starts Raft processing. Beyond that point, incoming Raft traffic is permitted and calls to `computeChecksumPostApply` are possible. The two stacktraces we have in that issue conclusively point to the `Store.consistencyLimiter` being nil during a call to `(*Replica).computeChecksumPostApply`. This startup-time race is the only possible explanation I could come up with. Release note (bug fix): Fixed a rare startup race that could cause a `invalid memory address or nil pointer dereference` error.
- Loading branch information