Skip to content

The error log of TSO doesn't print the cause #7496

Closed
@CabinfeverB

Description

Bug Report

[2023/12/06 10:46:41.796 +08:00] [ERROR] [tso_dispatcher.go:498] ["[tso] getTS error"] [dc-location=global] [stream-addr=http://127.0.0.1:49408] [error="[PD:client:ErrClientGetTSO]get TSO failed, after processing requests"]

but

pd/client/tso_dispatcher.go

Lines 493 to 496 in ef6ba85

log.Error("[tso] getTS error",
zap.String("dc-location", dc),
zap.String("stream-addr", streamAddr),
errs.ZapError(errs.ErrClientGetTSO.FastGenByArgs("after processing requests"), err))

And more, I do a test for ZapError

err1 := errors.New("test")
	log.Error("[pd] failed to close grpc clientConn", errs.ZapError(errs.ErrCloseGRPCConn, err1))

It prints

[2023/12/06 10:53:11.164 +08:00] [ERROR] [client_test.go:505] ["[pd] failed to close grpc clientConn"] [error="[PD:grpc:ErrCloseGRPCConn]test: test"] [stack="github.com/tikv/pd/tests/integrations/client_test.TestCustomTimeout\n\t/Users/jiangyongbo/github/pd/tests/integrations/client/client_test.go:505\ntesting.tRunner\n\t/usr/local/go/src/testing/testing.go:1595"]

"close gRPC connection failed" is overwritten by "test"

What did you do?

What did you expect to see?

What did you see instead?

What version of PD are you using (pd-server -V)?

Metadata

Assignees

Labels

affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.severity/minortype/bugThe issue is confirmed as a bug.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions