-
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.
72383: kvserver: use AdminSplit in splitTestRange r=erikgrinaker a=tbg `splitTestRange` was previously reaching into the store to finagle a split. It is used by around a dozen tests. Prototyping around #72374 has shown that these tests frequently need patching up whenever we adjust (improve) the store's replica handling. This is a time suck and besides, we also want to be able to test the Store from within the `kvserver` (not `kvserver_test`) package. So if we can make that happen, and can use AdminSplit, that would be preferrable. AdminSplit requires them to run a (somewhat) distributed multi-range transaction. A first split would hit a single range, but after that the split batch hits at least two ranges (meta2 and splitKey), and so we need nontrivial DistSender-like functionality. Splits are also nontrivial distributed transactions and so we need a TxnCoordSender. Experience suggests that it's better to use the "real thing" and to make sure it's configurable enough to fit the use case, rather than whipping up half-baked replacements. Luckily, it turned out that DistSender and TxnCoordSender are already up to the task, and this commit adopts them in `createTestStoreWithoutStart`, and changes `splitTestRange` to use `AdminSplit`. Release note: None Co-authored-by: Tobias Grieger <tobias.b.grieger@gmail.com>
- Loading branch information
Showing
6 changed files
with
198 additions
and
424 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
Oops, something went wrong.