From ca6e32ebac823cced30166efaa1ea5a223c04e89 Mon Sep 17 00:00:00 2001 From: Andy Yang Date: Thu, 18 Jul 2024 17:24:19 -0400 Subject: [PATCH] changefeedccl: add log messages for when a core changefeed retries/fails Release note: None --- pkg/ccl/changefeedccl/changefeed_stmt.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/ccl/changefeedccl/changefeed_stmt.go b/pkg/ccl/changefeedccl/changefeed_stmt.go index e788ef03ab95..5f551972e017 100644 --- a/pkg/ccl/changefeedccl/changefeed_stmt.go +++ b/pkg/ccl/changefeedccl/changefeed_stmt.go @@ -355,12 +355,14 @@ func coreChangefeed( err = knobs.HandleDistChangefeedError(err) } - if err = changefeedbase.AsTerminalError(ctx, p.ExecCfg().LeaseManager, err); err != nil { + if err := changefeedbase.AsTerminalError(ctx, p.ExecCfg().LeaseManager, err); err != nil { + log.Infof(ctx, "core changefeed failed due to error: %s", err) return err } // All other errors retry; but we'll use an up-to-date progress // information which is saved in the localState. + log.Infof(ctx, "core changefeed retrying due to transient error: %s", err) } return ctx.Err() // retry loop exits when context cancels. }