Skip to content

storage: Split storage.Stores #9014

@bdarnell

Description

@bdarnell

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.

Metadata

Metadata

Assignees

Labels

C-cleanupTech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions