Skip to content

Commit fd35fe3

Browse files
committed
batcheval: move all log lines from Dev to KvExec
Epic: none Release note: None
1 parent b530614 commit fd35fe3

17 files changed

+24
-24
lines changed

pkg/kv/kvserver/batcheval/cmd_add_sstable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ func computeSSTStatsDiffWithFallback(
475475
stats, err := storage.ComputeSSTStatsDiff(
476476
ctx, sst, readWriter, nowNanos, start, end)
477477
if errors.IsAny(err, storage.ComputeSSTStatsDiffReaderHasRangeKeys, storage.ComputeStatsDiffViolation) {
478-
log.Dev.Warningf(ctx, "computing SST stats as estimates because of ComputeSSTStatsDiff error: %s", err)
478+
log.KvExec.Warningf(ctx, "computing SST stats as estimates because of ComputeSSTStatsDiff error: %s", err)
479479
sstStats, err := computeSSTStats(ctx, sst, nowNanos)
480480
if err != nil {
481481
return enginepb.MVCCStats{}, errors.Wrap(err, "error computing SST stats during fallback")

pkg/kv/kvserver/batcheval/cmd_clear_range.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ func computeStatsDelta(
201201
// We only want to assert the correctness of stats that do not contain
202202
// estimates.
203203
if delta.ContainsEstimates == 0 && !delta.Equal(computed) {
204-
log.Dev.Fatalf(ctx, "fast-path MVCCStats computation gave wrong result: diff(fast, computed) = %s",
204+
log.KvExec.Fatalf(ctx, "fast-path MVCCStats computation gave wrong result: diff(fast, computed) = %s",
205205
pretty.Diff(delta, computed))
206206
}
207207
}

pkg/kv/kvserver/batcheval/cmd_end_transaction.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ func updateFinalizedTxn(
833833
opts := storage.MVCCWriteOptions{Stats: ms, Category: fs.BatchEvalReadCategory}
834834
if !evalCtx.EvalKnobs().DisableTxnAutoGC && len(externalLocks) == 0 {
835835
if log.V(2) {
836-
log.Dev.Infof(ctx, "auto-gc'ed %s (%d locks)", txn.Short(), len(args.LockSpans))
836+
log.KvExec.Infof(ctx, "auto-gc'ed %s (%d locks)", txn.Short(), len(args.LockSpans))
837837
}
838838
if !recordAlreadyExisted {
839839
// Nothing to delete, so there's no use writing a deletion tombstone. This
@@ -956,7 +956,7 @@ func RunCommitTrigger(
956956
return res, nil
957957
}
958958

959-
log.Dev.Fatalf(ctx, "unknown commit trigger: %+v", ct)
959+
log.KvExec.Fatalf(ctx, "unknown commit trigger: %+v", ct)
960960
return result.Result{}, nil
961961
}
962962

@@ -1400,7 +1400,7 @@ func splitTriggerHelper(
14001400
return enginepb.MVCCStats{}, result.Result{}, errors.Wrap(err, "unable to load lease")
14011401
}
14021402
if leftLease.Empty() {
1403-
log.Dev.Fatalf(ctx, "LHS of split has no lease")
1403+
log.KvExec.Fatalf(ctx, "LHS of split has no lease")
14041404
}
14051405

14061406
// Copy the lease from the left-hand side of the split over to the

pkg/kv/kvserver/batcheval/cmd_export.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func evalExport(
108108
return result.Result{}, err
109109
}
110110
if excludeFromBackup {
111-
log.Dev.Infof(ctx, "[%s, %s) is part of a table excluded from backup, returning empty ExportResponse", args.Key, args.EndKey)
111+
log.KvExec.Infof(ctx, "[%s, %s) is part of a table excluded from backup, returning empty ExportResponse", args.Key, args.EndKey)
112112
return result.Result{}, nil
113113
}
114114

@@ -292,7 +292,7 @@ func evalExport(
292292
return result.Result{}, errors.AssertionFailedf("ExportRequest exited without " +
293293
"exporting any data for an unknown reason; programming error")
294294
} else {
295-
log.Dev.Warningf(ctx, "unexpected resume span from ExportRequest without exporting any data for an unknown reason: %v", resumeInfo)
295+
log.KvExec.Warningf(ctx, "unexpected resume span from ExportRequest without exporting any data for an unknown reason: %v", resumeInfo)
296296
}
297297
}
298298
start = resumeInfo.ResumeKey.Key

pkg/kv/kvserver/batcheval/cmd_get.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func Get(
112112
case 1:
113113
reply.IntentValue = &intentVals[0].Value
114114
default:
115-
log.Dev.Fatalf(ctx, "more than 1 intent on single key: %v", intentVals)
115+
log.KvExec.Fatalf(ctx, "more than 1 intent on single key: %v", intentVals)
116116
}
117117
}
118118
}

pkg/kv/kvserver/batcheval/cmd_lease.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func evalNewLease(
7676
acquisitions, approxSize := rec.GetConcurrencyManager().OnRangeLeaseTransferEval()
7777
log.VEventf(ctx, 2, "upgrading durability of %d locks", len(acquisitions))
7878
if approxSize > durabilityUpgradeLimit {
79-
log.Dev.Warningf(ctx,
79+
log.KvExec.Warningf(ctx,
8080
"refusing to upgrade lock durability of %d locks since approximate lock size of %d byte exceeds %d bytes",
8181
len(acquisitions),
8282
approxSize,

pkg/kv/kvserver/batcheval/cmd_lease_request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func RequestLease(
9191
// Forwarding the lease's (minimum) expiration is safe because we know that
9292
// the lease's sequence number has been incremented. Assert this.
9393
if newLease.Sequence <= prevLease.Sequence {
94-
log.Dev.Fatalf(ctx, "lease sequence not incremented: prev=%s, new=%s", prevLease, newLease)
94+
log.KvExec.Fatalf(ctx, "lease sequence not incremented: prev=%s, new=%s", prevLease, newLease)
9595
}
9696
}
9797

pkg/kv/kvserver/batcheval/cmd_lease_transfer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func TransferLease(
108108
// Forwarding the lease's start time is safe because we know that the
109109
// lease's sequence number has been incremented. Assert this.
110110
if newLease.Sequence <= prevLease.Sequence {
111-
log.Dev.Fatalf(ctx, "lease sequence not incremented: prev=%s, new=%s", prevLease, newLease)
111+
log.KvExec.Fatalf(ctx, "lease sequence not incremented: prev=%s, new=%s", prevLease, newLease)
112112
}
113113

114114
log.VEventf(ctx, 2, "lease transfer: prev lease: %+v, new lease: %+v", prevLease, newLease)

pkg/kv/kvserver/batcheval/cmd_push_txn.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ func PushTxn(
244244
if !pusherWins {
245245
s = "failed to push"
246246
}
247-
log.Dev.Infof(ctx, "%s %s (push type=%s) %s: %s (pushee last active: %s)",
247+
log.KvExec.Infof(ctx, "%s %s (push type=%s) %s: %s (pushee last active: %s)",
248248
args.PusherTxn.Short(), redact.Safe(s),
249249
redact.Safe(pushType),
250250
args.PusheeTxn.Short(),
@@ -288,7 +288,7 @@ func PushTxn(
288288
// if initiated by a PUSH_TIMESTAMP.
289289
if pusheeStaging && pusherWins && pushType == kvpb.PUSH_TIMESTAMP {
290290
if !pusheeStagingFailed && !build.IsRelease() {
291-
log.Dev.Fatalf(ctx, "parallel commit must be known to have failed for push to succeed")
291+
log.KvExec.Fatalf(ctx, "parallel commit must be known to have failed for push to succeed")
292292
}
293293
pushType = kvpb.PUSH_ABORT
294294
}

pkg/kv/kvserver/batcheval/cmd_refresh.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func Refresh(
4040
if h.Timestamp != h.Txn.WriteTimestamp {
4141
// We're expecting the read and write timestamp to have converged before the
4242
// Refresh request was sent.
43-
log.Dev.Fatalf(ctx, "expected provisional commit ts %s == read ts %s. txn: %s", h.Timestamp,
43+
log.KvExec.Fatalf(ctx, "expected provisional commit ts %s == read ts %s. txn: %s", h.Timestamp,
4444
h.Txn.WriteTimestamp, h.Txn)
4545
}
4646
refreshTo := h.Timestamp

0 commit comments

Comments
 (0)