Skip to content

Commit 03209f5

Browse files
committed
Add session id
1 parent 146eaf0 commit 03209f5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

internal/table/client.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,15 @@ func (c *Client) BulkUpsert(
340340

341341
func makeReadRowsRequest(
342342
a *allocator.Allocator,
343+
sessionID string,
343344
path string,
344345
keys value.Value,
345346
readRowOpts []options.ReadRowsOption,
346347
) *Ydb_Table.ReadRowsRequest {
347348
request := Ydb_Table.ReadRowsRequest{
348-
Path: path,
349-
Keys: value.ToYDB(keys, a),
349+
SessionId: sessionID,
350+
Path: path,
351+
Keys: value.ToYDB(keys, a),
350352
}
351353
for _, opt := range readRowOpts {
352354
if opt != nil {
@@ -383,7 +385,7 @@ func (c *Client) ReadRows(
383385
) (_ result.Result, err error) {
384386
var (
385387
a = allocator.New()
386-
request = makeReadRowsRequest(a, path, keys, readRowOpts)
388+
request = makeReadRowsRequest(a, "", path, keys, readRowOpts)
387389
response *Ydb_Table.ReadRowsResponse
388390
)
389391
defer func() {

internal/table/session.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ func (s *Session) ReadRows(
13751375
) (_ result.Result, err error) {
13761376
var (
13771377
a = allocator.New()
1378-
request = makeReadRowsRequest(a, path, keys, opts)
1378+
request = makeReadRowsRequest(a, s.id, path, keys, opts)
13791379
response *Ydb_Table.ReadRowsResponse
13801380
)
13811381
defer func() {

0 commit comments

Comments
 (0)