@@ -168,7 +168,7 @@ func ClearRange(
168168// path of simply subtracting the non-system values is accurate.
169169// Returns the delta stats.
170170func computeStatsDelta (
171- ctx context.Context , readWriter storage.ReadWriter , cArgs CommandArgs , from , to roachpb.Key ,
171+ ctx context.Context , reader storage.Reader , cArgs CommandArgs , from , to roachpb.Key ,
172172) (enginepb.MVCCStats , error ) {
173173 desc := cArgs .EvalCtx .Desc ()
174174 var delta enginepb.MVCCStats
@@ -189,7 +189,7 @@ func computeStatsDelta(
189189 // If we can't use the fast stats path, or race test is enabled, compute stats
190190 // across the key span to be cleared.
191191 if ! entireRange || util .RaceEnabled {
192- computed , err := storage .ComputeStats (ctx , readWriter , from , to , delta .LastUpdateNanos )
192+ computed , err := storage .ComputeStats (ctx , reader , from , to , delta .LastUpdateNanos )
193193 if err != nil {
194194 return enginepb.MVCCStats {}, err
195195 }
@@ -214,7 +214,7 @@ func computeStatsDelta(
214214 if ! entireRange {
215215 leftPeekBound , rightPeekBound := rangeTombstonePeekBounds (
216216 from , to , desc .StartKey .AsRawKey (), desc .EndKey .AsRawKey ())
217- rkIter , err := readWriter .NewMVCCIterator (ctx , storage .MVCCKeyIterKind , storage.IterOptions {
217+ rkIter , err := reader .NewMVCCIterator (ctx , storage .MVCCKeyIterKind , storage.IterOptions {
218218 KeyTypes : storage .IterKeyTypeRangesOnly ,
219219 LowerBound : leftPeekBound ,
220220 UpperBound : rightPeekBound ,
0 commit comments