-
Notifications
You must be signed in to change notification settings - Fork 4.1k
storage: Split storage.Stores #9014
Copy link
Copy link
Closed
Labels
C-cleanupTech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.
Milestone
Description
storage.Stores contains several methods which are only intended for use in tests (LookupReplica, FirstRange, RangeLookup). However, not all tests need them (ones that use a DistSender generally shouldn't, although I was surprised to learn in #8868 that the split snapshot race tests hit this code path), and because Stores.Send "helpfully" calls LookupReplica if RangeID is zero, we could call these methods in production too.
These methods should be removed from Stores and placed on a wrapper object that can be used explicitly by tests that need it, so we can ensure that tests that shouldn't use it don't end up accidentally relying on this behavior.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-cleanupTech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.