-
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.
kvserver: introduce Store.{logEngine,todoEngine}
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`: - log engine - state engine - "TODO" engine. 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: introduce the new fields, look at all usages of the old field one by one and replace them as appropriate, leaving TODO comments where this seemed to add anything new. Finally, drop the old field as it had become unused. There is a flavor of TODO engine usages that requires us to simply chose which engine to use for the particular purpose. I'd like to move these into issues over time, making a temporary call for now, such that the CRDB-220 epic more completely reflects the scope of work included in it. Epic: CRDB-220 Release note: None
- Loading branch information
Showing
24 changed files
with
138 additions
and
82 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
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.