-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storage: don't write nonzero sticky bit before 19.2
Before 19.2, callers to AdminSplit are only ever supposed to pass `Expiration==hlc.Timestamp{}` as this triggers the legacy code path necessary while nodes in the cluster may not know desc.StickyBit yet. To avoid CPut problems when those nodes update the range descriptor, we must not persist non-nil values on it in that case. It looked like we would sometimes still persist a &zero, which could cause problems. The bigger problem though was that there were also two callers that straight-up didn't check the cluster version and passed nonzero values into AdminSplit. These callers were added recently and I can't blame anyone there; it is impossible to know that one argument needs to be zero before 19.2. Instead of trying to fix this invariant (which wasn't trivial in this case) just ignore expiration times when the coordinator doesn't think 19.2 is already active. This could lead to sticky bits being ignored right around the cluster transition, but that seems much better than risking old nodes not being able to carry out any changes to the descriptors any more (which is the consequence of writing non-nil sticky bits before this is safe). Release note (bug fix): Fix a cluster migration bug that could occur while running in a mixed 19.1/19.2 cluster. The symptom would be messages of the form: ``` X at key /Table/54 failed: unexpected value: ... ``` Affected clusters should be updated to 19.2 or, if 19.1 is desired, recreated from a backup.
- Loading branch information
1 parent
c3b82b0
commit a533375
Showing
3 changed files
with
35 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters