-
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.
96823: kvserver: introduce Store.{logEngine,todoEngine} r=pavelkalinnikov a=tbg Over the last few months, we have been chipping away[^1] at separating the engine interactions of the KV server in preparation for optionally running with a separate log engine for the raft state. [^1]: https://github.com/cockroachdb/cockroach/pulls?q=is%3Apr+%22CRDB-220%22+is%3Amerged+created%3A%3C2023-02-08 Plenty of work remains to be able to safely split these engines apart, or to even be able to do it at all, but now's a good time to take stock and syntactically "boil the ocean" by forcing all users of `Store.engine` to decide between three `Engine` fields - all for now backed by the same Engine - now present on `Store`: - `LogEngine()` - `StateEngine()` - `TODOEngine()` The third engine mirrors the `context.TODO()` pattern - the "TODO" engine indicates that work needs to be done to even arrive at an operation that targets one of the engines specifically; or that there is something that should be revisited about this particular usage. With the stability period coming up, we will want to avoid large mechanical changes in the near future, so now is a good time to get this out of the way and to work towards a "prototype plus" of the raft log separation for the remaining weeks. Ideally this would culminate in a way to actually run with two engines for experiments (ignoring crash-restart correctness issues and the like), which would be an important milestone for the project and would give us a reality check on the work that lies ahead to productionize this work. This refactor was carried out mechanically and it assigns *everything* to the `TODOEngine`. In other words, no brains have been put into deciding which engine to use yet. This will be done piecemeal in smaller PRs down the line, and will help discover new issues for the CRDB-220 epic. Epic: CRDB-220 Release note: None Co-authored-by: Tobias Grieger <[email protected]>
- Loading branch information
Showing
63 changed files
with
288 additions
and
213 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
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
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.