From a94bb79361dbbd89555404e2ac7f1e76dff5d5fe Mon Sep 17 00:00:00 2001 From: Roman Golov Date: Wed, 4 Sep 2024 22:16:48 +0300 Subject: [PATCH] Hide EOF error in recvMsg logs --- CHANGELOG.md | 2 ++ log/driver.go | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 102745f13..3dc8e35b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* EOF error in RecvMsg is no longer logged + ## v3.78.0 * Changed result type of method `query.Executor.QueryResultSet` from `query.ResultSet` to `query.ClosableResultSet` * Added `table/types.DecimalValueFromString` decimal type constructor diff --git a/log/driver.go b/log/driver.go index bc775a226..45363a64a 100644 --- a/log/driver.go +++ b/log/driver.go @@ -5,6 +5,7 @@ import ( "time" "github.com/ydb-platform/ydb-go-sdk/v3/internal/secret" + "github.com/ydb-platform/ydb-go-sdk/v3/internal/xerrors" "github.com/ydb-platform/ydb-go-sdk/v3/trace" ) @@ -302,7 +303,7 @@ func internalDriver(l Logger, d trace.Detailer) trace.Driver { start := time.Now() return func(info trace.DriverConnStreamRecvMsgDoneInfo) { - if info.Error == nil { + if xerrors.HideEOF(info.Error) == nil { l.Log(ctx, "done", latencyField(start), )