Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
korovindenis authored Apr 19, 2024
2 parents bca0d26 + 75ccf7e commit 7c9effd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
* Added type assertion checks to enhance type safety and prevent unexpected panics in critical sections of the codebase

## v3.65.3
* Fixed data race in `internal/conn.grpcClientStream`

## v3.65.2
* Fixed data race using `log.WithNames`

Expand Down
11 changes: 7 additions & 4 deletions internal/conn/grpc_client_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ type grpcClientStream struct {
}

func (s *grpcClientStream) CloseSend() (err error) {
onDone := trace.DriverOnConnStreamCloseSend(s.c.config.Trace(), &s.ctx,
ctx := s.ctx
onDone := trace.DriverOnConnStreamCloseSend(s.c.config.Trace(), &ctx,
stack.FunctionID("github.com/ydb-platform/ydb-go-sdk/3/internal/conn.(*grpcClientStream).CloseSend"),
)
defer func() {
Expand Down Expand Up @@ -59,7 +60,8 @@ func (s *grpcClientStream) CloseSend() (err error) {
}

func (s *grpcClientStream) SendMsg(m interface{}) (err error) {
onDone := trace.DriverOnConnStreamSendMsg(s.c.config.Trace(), &s.ctx,
ctx := s.ctx
onDone := trace.DriverOnConnStreamSendMsg(s.c.config.Trace(), &ctx,
stack.FunctionID("github.com/ydb-platform/ydb-go-sdk/3/internal/conn.(*grpcClientStream).SendMsg"),
)
defer func() {
Expand Down Expand Up @@ -101,7 +103,8 @@ func (s *grpcClientStream) SendMsg(m interface{}) (err error) {
}

func (s *grpcClientStream) RecvMsg(m interface{}) (err error) {
onDone := trace.DriverOnConnStreamRecvMsg(s.c.config.Trace(), &s.ctx,
ctx := s.ctx
onDone := trace.DriverOnConnStreamRecvMsg(s.c.config.Trace(), &ctx,
stack.FunctionID("github.com/ydb-platform/ydb-go-sdk/3/internal/conn.(*grpcClientStream).RecvMsg"),
)
defer func() {
Expand All @@ -114,7 +117,7 @@ func (s *grpcClientStream) RecvMsg(m interface{}) (err error) {
defer func() {
if err != nil {
md := s.ClientStream.Trailer()
s.onDone(s.ctx, md)
s.onDone(ctx, md)
}
}()

Expand Down
2 changes: 1 addition & 1 deletion internal/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package version
const (
Major = "3"
Minor = "65"
Patch = "2"
Patch = "3"

Prefix = "ydb-go-sdk"
)
Expand Down

0 comments on commit 7c9effd

Please sign in to comment.