Skip to content

Commit

Permalink
sidetransport: suppress logging when peer down
Browse files Browse the repository at this point in the history
It's duplicating info already logged by the rpc.Context.

Epic: none
Release note: None
  • Loading branch information
tbg committed May 17, 2023
1 parent 2db2fe9 commit 3c8f67e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/kv/kvserver/closedts/sidetransport/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ go_library(
"//pkg/util/hlc",
"//pkg/util/intsets",
"//pkg/util/log",
"//pkg/util/netutil",
"//pkg/util/stop",
"//pkg/util/syncutil",
"//pkg/util/timeutil",
Expand Down
4 changes: 3 additions & 1 deletion pkg/kv/kvserver/closedts/sidetransport/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ import (
"github.com/cockroachdb/cockroach/pkg/util/hlc"
"github.com/cockroachdb/cockroach/pkg/util/intsets"
"github.com/cockroachdb/cockroach/pkg/util/log"
"github.com/cockroachdb/cockroach/pkg/util/netutil"
"github.com/cockroachdb/cockroach/pkg/util/stop"
"github.com/cockroachdb/cockroach/pkg/util/syncutil"
"github.com/cockroachdb/cockroach/pkg/util/timeutil"
"github.com/cockroachdb/errors"
"google.golang.org/grpc"
)

Expand Down Expand Up @@ -794,7 +796,7 @@ func (r *rpcConn) run(ctx context.Context, stopper *stop.Stopper) {
return
}
if err := r.maybeConnect(ctx, stopper); err != nil {
if everyN.ShouldLog() {
if !errors.HasType(err, (*netutil.InitialHeartbeatFailedError)(nil)) && everyN.ShouldLog() {
log.Infof(ctx, "side-transport failed to connect to n%d: %s", r.nodeID, err)
}
time.Sleep(errSleepTime)
Expand Down

0 comments on commit 3c8f67e

Please sign in to comment.