Skip to content

Commit 6c3fed4

Browse files
authored
Merge pull request #134 from ydb-platform/replace-meta
replace meta in proxyConnection.Invoke and proxyConnection.NewStream
2 parents 53e1ff9 + e54ab73 commit 6c3fed4

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 3.11.5
2+
* Replaced meta in `proxyConnection.Invoke` and `proxyConnection.NewStream`
3+
14
## 3.11.4
25
* Refactored `internal/cluster.Cluster` (add option for notify about external lock, lock cluster for update cluster endpoints)
36
* Reverted `grpc.ClientConnInterface` API to `ydb.Connection`

internal/meta/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package meta
22

33
const (
4-
Version = "ydb-go-sdk/3.11.4"
4+
Version = "ydb-go-sdk/3.11.5"
55
)

proxy.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ func (c *proxyConnection) Invoke(
3535
args interface{},
3636
reply interface{},
3737
opts ...grpc.CallOption,
38-
) error {
38+
) (err error) {
39+
ctx, err = c.meta.Meta(ctx)
40+
if err != nil {
41+
return err
42+
}
3943
return c.connection.Invoke(
4044
ctx,
4145
method,
@@ -50,7 +54,11 @@ func (c *proxyConnection) NewStream(
5054
desc *grpc.StreamDesc,
5155
method string,
5256
opts ...grpc.CallOption,
53-
) (grpc.ClientStream, error) {
57+
) (_ grpc.ClientStream, err error) {
58+
ctx, err = c.meta.Meta(ctx)
59+
if err != nil {
60+
return nil, err
61+
}
5462
return c.connection.NewStream(
5563
ctx,
5664
desc,

0 commit comments

Comments
 (0)