Skip to content

Commit 16dc236

Browse files
committed
spanconfigreconciler: add and adopt some verbose logging
See #134383 (comment). Touches #153084. Epic: none
1 parent ac090a8 commit 16dc236

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/spanconfig/spanconfigreconciler/reconciler.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package spanconfigreconciler
77

88
import (
99
"context"
10+
"runtime/trace"
1011
"time"
1112

1213
"github.com/cockroachdb/cockroach/pkg/keys"
@@ -139,6 +140,7 @@ func (r *Reconciler) Reconcile(
139140
session sqlliveness.Session,
140141
onCheckpoint func() error,
141142
) error {
143+
defer trace.StartRegion(ctx, "spanconfig.Reconciler.Reconcile").End()
142144
// TODO(irfansharif): Avoid the full reconciliation pass if the startTS
143145
// provided is visible to the rangefeed. Right now we're doing a full
144146
// reconciliation pass every time the reconciliation job kicks us off.
@@ -185,6 +187,9 @@ func (r *Reconciler) Reconcile(
185187
r.mu.lastCheckpoint = reconciledUpUntil
186188
r.mu.Unlock()
187189

190+
if log.V(3) {
191+
log.Dev.Infof(ctx, "reconciled up until %s", reconciledUpUntil)
192+
}
188193
return onCheckpoint()
189194
})
190195
}
@@ -502,6 +507,9 @@ func (r *incrementalReconciler) reconcile(
502507
if len(sqlUpdates) == 0 {
503508
return callback(checkpoint) // nothing to do; propagate the checkpoint
504509
}
510+
if log.V(3) {
511+
log.Dev.Infof(ctx, "processing %d SQL updates", len(sqlUpdates))
512+
}
505513

506514
// Process the SQLUpdates and identify all descriptor IDs that require
507515
// translation. If the SQLUpdates includes ProtectedTimestampUpdates then

0 commit comments

Comments
 (0)