Skip to content

Commit 2c64828

Browse files
committed
* Diabled check the node is available for query service session
1 parent 45a2dd5 commit 2c64828

File tree

3 files changed

+4
-21
lines changed

3 files changed

+4
-21
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* Diabled check the node is available for query service session
2+
13
## v3.74.2
24
* Added description to scan errors with use query service client scanner
35

internal/query/client.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,6 @@ import (
2020

2121
//go:generate mockgen -destination grpc_client_mock_test.go -package query -write_package_comment=false github.com/ydb-platform/ydb-go-genproto/Ydb_Query_V1 QueryServiceClient,QueryService_AttachSessionClient,QueryService_ExecuteQueryClient
2222

23-
type nodeChecker interface {
24-
HasNode(id uint32) bool
25-
}
26-
27-
type balancer interface {
28-
grpc.ClientConnInterface
29-
nodeChecker
30-
}
31-
3223
var _ query.Client = (*Client)(nil)
3324

3425
type Client struct {
@@ -284,7 +275,7 @@ func (c *Client) DoTx(ctx context.Context, op query.TxOperation, opts ...options
284275
return nil
285276
}
286277

287-
func New(ctx context.Context, balancer balancer, cfg *config.Config) *Client {
278+
func New(ctx context.Context, balancer grpc.ClientConnInterface, cfg *config.Config) *Client {
288279
onDone := trace.QueryOnNew(cfg.Trace(), &ctx,
289280
stack.FunctionID("github.com/ydb-platform/ydb-go-sdk/3/internal/query.New"),
290281
)
@@ -315,7 +306,7 @@ func New(ctx context.Context, balancer balancer, cfg *config.Config) *Client {
315306

316307
s, err := createSession(createCtx, client.grpcClient, cfg,
317308
withSessionCheck(func(s *Session) bool {
318-
return balancer.HasNode(uint32(s.nodeID))
309+
return true
319310
}),
320311
)
321312
if err != nil {

internal/query/session.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,6 @@ func createSession(
8787
cfg: cfg,
8888
grpcClient: client,
8989
statusCode: statusUnknown,
90-
checks: []func(*Session) bool{
91-
func(s *Session) bool {
92-
switch s.status() {
93-
case statusIdle, statusInUse:
94-
return true
95-
default:
96-
return false
97-
}
98-
},
99-
},
10090
}
10191
defer func() {
10292
if finalErr != nil && s != nil {

0 commit comments

Comments
 (0)