From 4d57263e3315ab8a7e416486d3d885981d32701c Mon Sep 17 00:00:00 2001 From: Daniil Cherednik Date: Fri, 1 Nov 2024 16:51:18 +0100 Subject: [PATCH] fix --- internal/table/client.go | 4 ++-- table/table.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/table/client.go b/internal/table/client.go index b2fea932c..d5983aa6d 100644 --- a/internal/table/client.go +++ b/internal/table/client.go @@ -219,7 +219,7 @@ func (c *Client) Do(ctx context.Context, op table.Operation, opts ...table.Optio err := do(ctx, c.pool, c.config, op, func(err error) { attempts++ - }, config.preferredNodeID, config.RetryOptions...) + }, config.PreferredNodeID, config.RetryOptions...) if err != nil { return xerrors.WithStackTrace(err) } @@ -270,7 +270,7 @@ func (c *Client) DoTx(ctx context.Context, op table.TxOperation, opts ...table.O } return nil - }, config.preferredNodeID, config.RetryOptions...) + }, config.PreferredNodeID, config.RetryOptions...) } func (c *Client) BulkUpsert( diff --git a/table/table.go b/table/table.go index 176a013ed..2ef70b302 100644 --- a/table/table.go +++ b/table/table.go @@ -505,7 +505,7 @@ type Options struct { TxCommitOptions []options.CommitTransactionOption RetryOptions []retry.Option Trace *trace.Table - preferredNodeID uint32 + PreferredNodeID uint32 } type Option interface { @@ -517,7 +517,7 @@ type SessionOption struct { } func (o SessionOption) ApplyTableOption(opts *Options) { - opts.preferredNodeID = o.preferredNodeID + opts.PreferredNodeID = o.preferredNodeID } var _ Option = labelOption("") @@ -557,7 +557,7 @@ func WithIdempotent() retryOptionsOption { return []retry.Option{retry.WithIdempotent(true)} } -func WithpreferredNodeID(nodeId uint32) SessionOption { +func WithPreferredNodeID(nodeId uint32) SessionOption { return SessionOption{preferredNodeID: nodeId} }