Skip to content

Commit 5ce05b7

Browse files
committed
kvserver: use StateEngine in replica_command.go
A few obvious cases of accessing only the state machine engine. Epic: none Release note: none
1 parent 98f238f commit 5ce05b7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/kv/kvserver/replica_command.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ func (r *Replica) adminSplitWithDescriptor(
363363
var err error
364364
targetSize := r.GetMaxBytes(ctx) / 2
365365
foundSplitKey, err = storage.MVCCFindSplitKey(
366-
ctx, r.store.TODOEngine(), desc.StartKey, desc.EndKey, targetSize)
366+
ctx, r.store.StateEngine(), desc.StartKey, desc.EndKey, targetSize)
367367
if err != nil {
368368
return reply, errors.Wrap(err, "unable to determine split key")
369369
}
@@ -394,7 +394,7 @@ func (r *Replica) adminSplitWithDescriptor(
394394
return reply, err
395395
}
396396
if foundSplitKey, err = storage.MVCCFirstSplitKey(
397-
ctx, r.store.TODOEngine(), desiredSplitKey,
397+
ctx, r.store.StateEngine(), desiredSplitKey,
398398
desc.StartKey, desc.EndKey,
399399
); err != nil {
400400
return reply, errors.Wrap(err, "unable to determine split key")
@@ -539,7 +539,7 @@ func (r *Replica) adminSplitWithDescriptor(
539539
// post-split LHS stats by combining these stats with the non-user stats
540540
// computed in splitTrigger. More details in makeEstimatedSplitStatsHelper.
541541
userOnlyLeftStats, err = rditer.ComputeStatsForRangeUserOnly(
542-
ctx, leftDesc, r.store.TODOEngine(), fs.BatchEvalReadCategory,
542+
ctx, leftDesc, r.store.StateEngine(), fs.BatchEvalReadCategory,
543543
r.store.Clock().NowAsClockTimestamp().WallTime)
544544
if err != nil {
545545
return reply, errors.Wrapf(err, "unable to compute user-only pre-split stats for LHS range")

0 commit comments

Comments
 (0)