Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
67707: kv: fix aliasing bug in leaseHistory.get r=michae2 a=nvanbenschoten This commit fixes a bug in `leaseHistory.get` where we were unintentionally returning an aliased slice that was protected by the struct's mutex instead of returning the new slice that we had already copied into under lock. This bug has been around since the original introduction of this leaseHistory type, over 4 years ago. This was the likely cause of an `index out of range` crash we saw in a production cluster that was serving a `RangesResponse` for a debug.zip. Release note (bug fix): A rare bug that could result in a crash while creating a debug.zip has been fixed. The bug was only possible to hit if a debug.zip was captured during a period of rapid lease movement. Co-authored-by: Nathan VanBenschoten <[email protected]>
- Loading branch information