Open pelageech opened 1 month ago
Thanks for the issue. It is bug into ydb-go-sdk-otel repository, bad implementation of safe func.
I saw that and will research it next week.
Thanks for the issue. It is bug into ydb-go-sdk-otel repository, bad implementation of safe func. I saw that and will research it next week.
Hi. Please raise the priority this is a blocker for us.
Bug Report
YDB GO SDK version: 3.75.2
Environment macOS Sonoma 14.2.1, amd64
Current behavior:
Expected behavior: No panic.
Steps to reproduce: In
vendor/github.com/ydb-platform/ydb-go-sdk/v3/internal/query/session.go
with funccreateSession
whenonDone
is deferred, there is named returned variable passed to the function. If something goes wrong, the named variable is overwritten to nil and the tracer (ydb-go-sdk-otel
in my case) calls*Session.ID()
where*Session
is already nil. Inydb-go-sdk-otel/internal/safe.ID(id id)
func it's checked if the interfaceid
is nil, but it isn't since the covered type is *Session == nil.To reproduce the panic cancel context after deferred
onDone
before grpc call increateSession
and run the code below.Related code:
createSession snippet:
Other information: