-
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.
62719: kvserver: simplify and document handling of ReplicaPlaceholder r=erikgrinaker a=tbg This commit cleans up the handling of ReplicaPlaceholder and documents their semantics better. I embarked on this while looking into an unrelated test flake. It occurred to me that we were not installing placeholders before the snapshot transfer, but only after. This seems like a bad idea now that our average snapshot size has gone up, as placeholders help avoid duplicate work; we now install them before accepting the range data. In practice, we currently only allow once snapshot inflight per store, so it is not clear that that improvement is buying us anything. I think that the improved clarity in this commit will, though. Concretely, we now have two simple rules for placeholders: 1. they only exist for uninitialized replicas (and must exist for those, or we can end up with overlapping replicas) 2. you write it --> you (and *only* you) remove it. 1 was true before but the documentation was not clear. 2. was not true, as there were a few out-of-band places that removed placeholders (and didn't clearly explain why - sounded like we were previously leaking placeholders, maybe @ajwerner remembers?). There's also a bit of extra cleanup that clarifies things - for example, since caller to `applySnapshot` already checked for an empty snapshot, the placeholder removal within it effectively dead code and is now removed. Also, in receiveSnapshot, there was an optimistic check that allowed us to discard snapshots early. It was always confusing to keep track of which one is which and now that we've lifted the authoritative check to the top of receiveSnapshot, we got to delete the other one. Release note: None 65454: jobs: move trace_id from payload to progress r=pbardea a=adityamaru The trace_id associated with a job is updated on every resumption of the job. If the job is paused and resumed several times, we don't want to rewrite the payload every single time. Thus, we move the field to the job progress which is expected to be rewritten frequently. Also addresses a comment from #65322. Release note: None Co-authored-by: Tobias Grieger <[email protected]> Co-authored-by: Aditya Maru <[email protected]>
- Loading branch information
Showing
21 changed files
with
989 additions
and
674 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Oops, something went wrong.