@@ -148,14 +148,14 @@ func checkCanInitializeEngine(ctx context.Context, eng storage.Engine) error {
148148type readKeyFn func (roachpb.Key , protoutil.Message ) (bool , error )
149149type scanRangeIDFn func (roachpb.RangeID , readKeyFn ) error
150150
151- // IterateIDPrefixKeys helps visit system keys that use RangeID prefixing (such
151+ // iterateRangeIDKeys helps visit system keys that use RangeID prefixing (such
152152// as RaftHardStateKey, RangeTombstoneKey, and many others). Such keys could in
153153// principle exist at any RangeID, and this helper efficiently discovers all the
154154// keys of the desired type (as specified by the supplied `keyFn`) and, for each
155155// key-value pair discovered, unmarshals it into `msg` and then invokes `f`.
156156//
157157// Iteration stops on the first error (and will pass through that error).
158- func IterateIDPrefixKeys (
158+ func iterateRangeIDKeys (
159159 ctx context.Context , reader storage.Reader , scanRangeID scanRangeIDFn ,
160160) error {
161161 // NB: Range-ID local keys have no versions and no intents.
@@ -509,7 +509,7 @@ func loadReplicas(ctx context.Context, eng storage.Engine) ([]Replica, error) {
509509 // entire raft state (i.e. HardState, TruncatedState, Log).
510510 logEvery := log .Every (10 * time .Second )
511511 var i int
512- if err := IterateIDPrefixKeys (ctx , eng , func (id roachpb.RangeID , get readKeyFn ) error {
512+ if err := iterateRangeIDKeys (ctx , eng , func (id roachpb.RangeID , get readKeyFn ) error {
513513 if logEvery .ShouldLog () && i > 0 { // only log if slow
514514 log .KvExec .Infof (ctx , "loaded state for %d/%d replicas" , i , len (s ))
515515 }
0 commit comments