Skip to content

Commit df037b5

Browse files
authored
Merge branch 'master' into transactions-topic-query
2 parents ec8c4ac + e51dc72 commit df037b5

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
* Added traces and logs for read messages from topic within transaction
2+
* Changed result type of `query.Session.NodeID()` from `int64` to `uint32` for compatibility with table session and discovery
23
* Removed experimental method `query.Result.Err()`
34
* Added the finishing reading the grpc stream on `query.Result.Close()` call
45
* Renamed experimental method `query.Result.Range()` to `query.Result.ResultSets()`

internal/query/session.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ var _ query.Session = (*Session)(nil)
2424
type Session struct {
2525
cfg *config.Config
2626
id string
27-
nodeID int64
2827
grpcClient Ydb_Query_V1.QueryServiceClient
28+
nodeID uint32
2929
statusCode statusCode
3030
closeOnce func(ctx context.Context) error
3131
checks []func(s *Session) bool
@@ -108,7 +108,7 @@ func createSession(ctx context.Context, client Ydb_Query_V1.QueryServiceClient,
108108
}
109109

110110
s.id = response.GetSessionId()
111-
s.nodeID = response.GetNodeId()
111+
s.nodeID = uint32(response.GetNodeId())
112112

113113
err = s.attach(ctx)
114114
if err != nil {
@@ -278,7 +278,7 @@ func (s *Session) ID() string {
278278
return s.id
279279
}
280280

281-
func (s *Session) NodeID() int64 {
281+
func (s *Session) NodeID() uint32 {
282282
return s.nodeID
283283
}
284284

query/session.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
type (
1414
SessionInfo interface {
1515
ID() string
16-
NodeID() int64
16+
NodeID() uint32
1717
Status() string
1818
}
1919

trace/query.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
type (
1414
querySessionInfo interface {
1515
ID() string
16-
NodeID() int64
16+
NodeID() uint32
1717
Status() string
1818
}
1919
queryTransactionInfo interface {

0 commit comments

Comments
 (0)