- Fixed
pool.getItem()panics, if unable to give session for preferred node ID
- Moved
internal/decimalpackage topkg/decimalfor public usage
- Added
trace.NodeHintInfofield for OnPoolGet trace callback which stores info for node hint misses - Added
ydb_go_sdk_ydb_table_pool_node_hint_missandydb_go_sdk_ydb_query_pool_node_hint_missmetrics for node hint misses
- Added support for
Timestamp64type invalue.Anyconverter - Masked the sensitive credential data in the connection string (DSN, data source name) from error messages for security reasons
- Fixed issue with topic offsets update in transactions
- Changed internal pprof label to pyroscope supported format
- Added
query.ImplicitTxControl()transaction control (the same asquery.NoTx()andquery.EmptyTxControl()). See more about implicit transactions on ydb.tech - Added
SnapshotReadWriteisolation mode support todatabase/sqldriver usingsql.TxOptions{Isolation: sql.LevelSnapshot, ReadOnly: false} - Moved
internal/ratelimiter/optionstoratelimiter/optionsfor public usage
- Added support of
SnapshotReadWriteisolation mode into query and table clients
- Made error "Request exceeded a limit on the number of schema operations, try again later" retryable
- Fixed deadlock in
Endpoint.String()method - Added the
AvailabilityPeriodto the Consumer type in topics
- Fixed
contextchecking inydb.Open
- Fixed checking GRPC transport error in
discovery
- Fixed connection timeout issue in topics writer
- Supported
sql.Null*fromdatabase/sqlas query params intoValuefunc
- Added support for nullable
Date32,Datetime64,Timestamp64, andInterval64types in theoptionalparameter builder - Added method
query.WithIssuesHandlerto get query issues
- Added support for
Result.RowsAffected()for YDBdatabase/sqldriver - Upgraded minimal version of Go to 1.23.9
- Fixed race in
readerReconnector
- Fixed scan a column of type
Decimal(precision,scale)into a struct field of typetypes.Decimal{}usingScanStruct() - Fixed race in integration test
TestTopicWriterLogMessagesWithoutData - Fixed traces handling in
topic.Reader
- Fixed
conn/pool.Get()behaviour for YDB databases with public IPs. Bug was introduced in v3.116.2 - Added helper methods
log.WithFieldsandlog.FieldsFromContextfor working with structured logging fields via context. These methods allow adding custom fields to the context, which are later extracted by the logger.
- Fixed error handling in
internaltopicreader.addOnTransactionCompletedHandler
- Default grpc message size adjusted to the server's defaults
- Fixed grpc connections leak on reused node IP
- Fixed an issue where
topic.UpdateOffsetsInTransactionwas executed on a node different from the one where the transaction was running, which could lead to the error "Database coordinators are unavailable"
- Added experimental support for query results in
Apache Arrow - Fix flaky unit test TestUnboundedChanContextTimeout
- Added support for
PartitionByinDescribeTableresults
- Fixed context cancellation issues in the
QueryServicestream results
- Fixed error logging in
topic.UpdateOffsetsInTransaction
- Supported reusing one IP address and host name after nodes restart
- Fixed error catching in
retry.DoTxWithResult
- Fixed bug with wrong literal YQL representation for signed integer YDB types
- Added
ydb.Param.Range()range iterator
- Added public package
pkg/xtestwith test helpers
- Fixed depth for
pkg/xerrors.WithStackTrace()error
- Added public packages:
pkg/xerrors- helpers for wrap errors with stacktrace and join errorspkg/xslices- helpers for work with slicespkg/xstring- helpers for work with strings
- Added
table.Client.DescribeTable()helper method - Added
table/types/IsNull()andtable/types/Unwrap()methods for work with optional values
- Removed experimental label from
retry.DoWithResultandretry.DoTxWithResult
- Fixed incorrect string conversion of
Uint64Valuevalues greater thanint64max value
- Added original error to
listValueandsetValuecast error
- Marked as non-retryable operation error
ABORTEDwith internal issue200509("Datashard program size limit exceeded")
- Fixed panic in
database/sqltraces
- Fixed several issues in
database/sqlerror handling - Improved context management for query result streams.
- Added experimental
config.WithDisableOptimisticUnbanoption to disable fast node unban after pessimization - Fixed respect start offset from
topicoptions.WithReaderGetPartitionStartOffsetfor commit messages - Added
query.AllowImplicitSessions()option for execute queries throughquery.Client.{Exec,Query,QueryResultSet,QueryRow}without explicit sessions
- Added support for the
json.Unmarshalerinterface in theCastTofunction for use in scanners, such as theScanStructmethod - Fixed the support of server-side session balancing in
database/sqldriver - Added
ydb.WithDisableSessionBalancer()driver option for disable server-side session balancing on table and query clients
- Fixed session closing in
ydb.WithExecuteDataQueryOverQueryClient(true)scenario
- Changed discovery and dns resolving log level to DEBUG
- Replaced minimal requirements of
gofrom1.23to1.22 - Migrated
golangci-lintto versionv2.1.6
- Added
sugar.PrintErrorWithoutStackhelper for remove stack records from error string - Added
sugar.UnwrapErrorhelper for unwrap source error to root errors
- Added the ability to send BulkRequest exceeding the GrpcMaxMessageSize
- Added read partitions in parallel for topic listener.
- Added control plane fields for split-merge topics (Create,Alter,Describe)
- Fixed stop topic reader after TLI in transaction
- Removed
experimentalfrom coordination API - Added
WithReaderLogContext,WithWriterLogContextoptions to topic reader/writer to supply log entries with user context fields
- Fixed handling of zero values for DyNumber
- Fixed the decimal yql slice bounds out of range
- Bumped dependencies:
github.com/jonboulle/clockworkfrom v0.3.0 to v0.5.0google.golang.org/grpcfrom v1.62.1 to v1.69.4google.golang.org/protobuffrom v1.33.0 to v1.35.1github.com/golang-jwt/jwt/v4from v4.5.0 to v4.5.2 (see security alerts https://github.com/golang-jwt/jwt/security/advisories/GHSA-mh63-6h87-95cp and https://github.com/ydb-platform/ydb-go-sdk/security/dependabot/45)golang.org/x/netfrom v0.33.0 to v0.38.0 (see security alert https://github.com/ydb-platform/ydb-go-sdk/security/dependabot/59)golang.org/x/cryptofrom 0.31.0 to 0.36.0 (see security alerts https://github.com/ydb-platform/ydb-go-sdk/security/dependabot/56 and https://github.com/ydb-platform/ydb-go-sdk/security/dependabot/52)golang.org/x/syncfrom v0.10.0 to v0.12.0golang.org/x/sysfrom v0.28.0 to v0.31.0golang.org/x/textfrom v0.21.0 to v0.23.0
- Supported
json.Marshallerquery parameter indatabase/sqldriver
- Added
query.EmptyTxControl()for empty transaction control (server-side defines transaction control by internal logic) - Marked as deprecated
query.NoTx()because this is wrong name for server-side transaction control inference
- Refactored internal client balancer: added singleton for getting gRPC-connection (auto dial and auto reconnect on non-ready state) for use in discovery attempts
- Added
topicoptions.IncludePartitionStats()forTopic().Describe()in order to get partition stats from server
- Dropped
internal/allocatorpackage and all usages of it for further switch (test) protobuf opaque API
- Added option WithReaderSupportSplitMergePartitions for topic manage support of split-merge partitions on client side (enabled by default).
- Allowed overflow queue limit for one goroutine at time for topic writer
- Removed delay before send commit in sync mode of a topic reader
- Improved the
ydb.WithSessionPoolSessionUsageLimitoption for allowtime.Durationas argument type for limit max session time to live since create time
- Changed the gRPC DNS balancer policy to
round_robinfor internaldiscovery/ListEndpointscall (reverted v3.90.2 changes)
- Supported topic split merge server feature for topic reader (no api changed)
- Added public type alias
ydb.Paramstointernal/params.Parametersfor external usage
- Refactored
table.TransactionControlandquery.TransactionControlfor use single implementation ininternal/tx - Changed
ydb.WithTxControlcontext modifier for allow bothtable.TransactionControlandquery.TransactionControl
- Added query client session pool metrics: create_in_progress, in_use, waiters_queue
- Added pool item closing for not-alived item
- Fixed bug with session query latency metric collector
- Changed argument types in
table.Client.ReadRowsto public types for compatibility with mock-generation
- Added bindings options into
ydb.ParamsFromMapfor bind wide time types - Changed
ydb.WithWideTimeTypes(bool)for allow boolean argument
- Added export of advanced metric information for QueryService calls
- Added binding
ydb.WithWideTimeTypes()which interpretstime.Timeandtime.DurationasTimestamp64andInterval64YDB types
- Supported wide
Interval64type
- Supported wide
Date32,Datetime64andTimestamp64types
- Switched internal type of result
ydb.Driver.Query()from*internal/query.Clienttoquery.Clientinterface
- Added
query.TransactionActortype alias toquery.TxActorfor compatibility withtable.ClientAPI's - Removed comment
experimentalfromydb.ParamsBuilderandydb.ParamsFromMap - Fixed panic on closing
internal/query/sessionCore.donechannel twice - Fixed hangup when try to send batch of messages with size more, then grpc limits from topic writer internals
- Added a new metric
ydb_go_sdk_ydb_infowith the current version of the SDK
- Changed allowBanned=false for preferred node connections
- Added
table.Client.ReadRowsmethod with internal retries
- Fixed bug with concurrent rewrites source slice of
grpc.DialOptionon dial step
- Fixed bug in
internal/xcontext.WithDone(not listening chan done)
- Refactored behaviour on
retry.Retryableerror for retry object (such as session, connection or transaction)
- Added
table.DescribeTable.StoreTypeto table description result fromtable.Session.DescribeTablerequest
- Added checking errors for conditionally delete item from pool
- Internal debug improved
- Added stacktrace record to row scan errors for detect broken client code
- Fixed DescribeConsumer ignoring PartitionConsumerStats
- Added virtualtimestamps field to cdc description
- Returned legacy behaviour for interpret as
time.TimeYDB typesDate,DatetimeandTimestamp
- Fixed broken compatibility
database/sqldriver which worked on query engine (usnigydb.WithQueryService(true)connector option):- fixed list of valid data types for
database/sql.Row.Scan() - allowed legacy option
ydb.WithTxControl(ctx, txControl)for query engine
- fixed list of valid data types for
- Added details to all log messages
- Fixed sometime panic on stats receive in query service
- Fixed not passing request context to topic event logs
- Fixed deadlock on closing table session with internal query session core
- Added log grpc messages metadata on trace log level for topic writer
- Fixed error
Empty query textusing prepared statements andydb.WithExecuteDataQueryOverQueryClient(true)option - Prepared statements always send query text on Execute call from now (previous behaviour - send query ID)
- Prevented create decoder instance until start read a message from topics
- Fixed bug with wrong context on session closing
- Fixed goroutine leak on closing
database/sqldriver - "No endpoints" is retriable error now
- Fixed potential infinity loop for local dc detection (CWE-835)
- Fixed nil pointer dereferenced in a topic listener (CWE-476)
- Fixed panic when error returned from parsing sql params
- Fixed explicit null dereferenced issue in internal/credentials/static.go (CWE-476)
- Bumped dependencies:
golang.org/x/netfrom v0.23.0 to v0.33.0golang.org/x/syncfrom v0.6.0 to v0.10.0golang.org/x/sysfrom v0.18.0 to v0.28.0golang.org/x/textfrom v0.14.0 to v0.21.0github.com/golang-jwt/jwt/v4from v4.4.1 to v4.5.0
- Added
ydb.WithExecuteDataQueryOverQueryClient(bool)option to execute data queries from table service client using query client API. Using this option you can execute queries from legacy table service client throughtable.Session.Executeusing internal query client API without limitation of 1000 rows in response. Be careful: an OOM problem may happen because bigger result requires more memory
- Supported pool of encoders, which implement ResetableWriter interface
- Added immutable range iterators from go1.23 into query stats to iterate over query phases and accessed tables without query stats object mutation
- Fixed broken metric
ydb_go_sdk_ydb_database_sql_conns
- Fixed drop session from pool unnecessary in query service
- Supported of list, set and struct for unmarshall using
sugar.Unmarshall...
- Fixed panic on span reporting in
xsql/Tx
- Fixed goroutine leak on failed execute call in query client
- Fixed connections pool leak on closing sessions
- Fixed an error in logging session deletion events
- Supported of
database/sql/driver.Valuerinterfaces for params which passed to query using sql driver - Exposed
credentials/credentials.OAuth2ConfigOAuth2 config
- Fixed panic on multiple closing driver
- Added alias from
ydb.WithFakeTx(ydb.ScriptingQueryMode)toydb.WithFakeTx(ydb.QueryExecuteQueryMode)for compatibility with legacy code
- Added implementation of
database/sqldriver over query service client - Added
ydb.WithQueryService(bool)option to explicitly enabledatabase/sqldriver over query service client - Added environment parameter
YDB_DATABASE_SQL_OVER_QUERY_SERVICEto enabledatabase/sqldriver over query service client without code rewriting
- Refactored golang types mapping into ydb types using
ydb.ParamsFromMapanddatabase/sqlquery arguments - Small breaking change: type mapping for
ydb.ParamsFromMapanddatabase/sqltypeuuid.UUIDchanged from ydb typeTextto ydb typeUUID
- Supported raw protobuf
*Ydb.TypedValueusingydb.ParamsBuilder()
- Removed experimental helper
ydb.MustParamsFromMap - Changed result of experimental helper
ydb.ParamsFromMapfrom tuple <params.Parameters,error> toparams.Parametersonly
- Published
query.ExecuteOptionas alias tointernal/query/options.Execute
- Added
ydb.WithStaticCredentialsLoginandydb.WithStaticCredentialsPasswordoptions
- Fixed string representation of
TzTimestamp,TzDatetimeandTzDatetype values - Added
database/sql/driver.Valueas type destination for almost ydb values
- Avoid retrying requests finished with
UNAUTHORIZEDerrors
- Fixed connections pool leak on closing
- Fixed error with incompleted data return from transaction.ReadQueryResult method
- Added option
query/WithResponsePartLimitSizeBytes(...)for queries with query service
- Added
table/options.WithShardNodesInfo()experimental option to get shard nodeId for describe table call
- Added
sugar.WithUserPassword(user,password)option forsugar.DSN()helper - Added
sugar.WithSecure(bool)option forsugar.DSN()helper - Small breaking change:
sugar.DSNhave only two required parameters (endpoint and database) from now on. Third parametersecuremust be passed as optionsugar.WithSecure(bool)
- Added experimental ydb.ParamsFromMap and ydb.MustParamsFromMap for build query parameters
- Refactored coordination traces
- gRPC connection will be forcefully closed on DNS resolver errors from now on
- Added
ydb.WithPreferredNodeID(ctx, nodeID)context modifier for trying to execute queries on given nodeID
- Set the
pick_firstbalancer for short-lived grpc connection inside ydb cluster discovery attempt
- Small broken change: added method
ID()intospans.Spaninterface (need to implement in adapter) - Fixed traceparent header for tracing grpc requests
- Fixed closing of child driver with shared balancer
- Refactored
database/sqldriver internals for query-service client support in the future
- Fixed nil pointer dereference in metabalancer initialization
- Changed behaviour on re-discovery: always open new grpc connection for discovery request
- Wrapped internal balancer with metadata middleware
- Returned log.XXX methods for create fields, removed from public at v3.85.0
- Added option
ydb.WithSharedBalancer(*Driver)for child drivers
- Fixed send optional arguments to the server with
ydb.ParamsBuilder
- Removed UUID methods from ydb.ParamsBuilder()
- BREAK OLD STYLE WORK WITH UUID. See ydb-platform#1501 for details. At the version you must explicit choose way for work with uuid: old with bug or new (fixed).
- Fixed scan to optional uuid
- Add workaround for bug in uuid send/receive from server. It is migration version. All native code and most database sql code worked with uuid continue to work. Dedicated version for migrate code for workaround/fix uuid bug. See ydb-platform#1501 for details.
- Renamed
query.WithPoolID()intoquery.WithResourcePool()
- Added experimental
query.WithPoolID()execute option for define resource pool for execute query
- Added
spans.Retryconstructor oftrace.Retry
- Added experimental package
spanswith tracing adapter interfaces for OpenTelemetry, OpenTracing, etc. - Added
db.Topic().DescribeTopicConsumer()method for displaying consumer information - Marked as deprecated options
ydb.WithDatabase(database)andydb.WithEndpoint(endpoint)
- Added session info into
trace.TableSessionBulkUpsertStartInfo
- Added
meta.WithTraceParentcontext modifier for explicit putting traceparent header into grpc calls
- Supported
db.Table().BulkUpsert()from scv, arrow and ydb rows formats
- Fixed error on experimental
TopicListener.Close - Disabled reporting of
ydb_go_sdk_query_session_countwhen metrics are disabled - Disabled reporting of
ydb_go_sdk_ydb_query_session_create_latencyhistogram metrics when metrics are disabled - Allowed skip column for
ScanStructby tag-
- Returned
topicwriter.ErrQueueLimitExceed, accidental removed atv3.81.0
- Fixed tracing details check for some metrics
- Removed
experimantalcomment for query service client
- Fixed nil pointer dereference panic on failed
ydb.Open - Added ip discovery. Server can show own ip address and target hostname in the ListEndpoint message. These fields are used to bypass DNS resolving.
- Added error ErrMessagesPutToInternalQueueBeforeError to topic writer
- Added write to topics within transactions
- Added
ydb.WithSessionPoolSessionUsageLimit()option for limitation max count of session usage - Refactored experimental topic iterators in
topicsugarpackage
- Fixed bug in experimental api:
ydb.ParamsBuilder().Param().Optional()receive pointer and really produce optional value.
- Added
ydb.WithLazyTx(bool)option for create lazy transactions onquery.Session.Begincall - Added initial experimental topic and cdc-helpers, see examples in tests/integration/topic_helpers_test.go
- Added experimental
sugar.UnmarshalRowsfor user unmarshaller structs in own code in go 1.23, change example for use the iterator. - Added
ydb_go_sdk_ydb_query_pool_size_indexmetrics
- Fixed bug with doesn't rollback the transaction on the operation error in table service
- Fixed concurrent map writes in metrics
- Renamed method at experimental API
reader.PopBatchTxtoreader.PopMessagesBatchTx
- Fixed connections pool leak on failed
ydb.Opencall
- Fixed panic on usage metrics package from prometheus adapter on
trace.Driver.OnNewStreamcallback
- Added option
ydb.WithSessionPoolSessionIdleTimeToLivefor restrict idle time of query sessions - Fixed bug with leak of query transactions
- Changed
ydb_go_sdk_ydb_driver_conn_requestsmetrics splitted toydb_go_sdk_ydb_driver_conn_request_statusesandydb_go_sdk_ydb_driver_conn_request_methods - Fixed metadata for operation service connection
- Fixed composing query traces in call
db.Query.Do[Tx]using optionquery.WithTrace
- Added
balancers.PreferNearestDC[WithFallback]balancers - Marked as deprecated
balancers.PreferLocalDC[WithFallback]balancers becauselocalword is ambiguous for balancer idea
- Added
lastErrfrom previous attempt inretry.RetryWithResult
- Replaced internal table client pool entities to
internal/pool
- Enabled by default usage of
internal/poolininternal/query.Client
- Changed
trace.Tableandtrace.Querytraces - Implemented
internal/poolthe same as table client pool frominternal/table.Client
- Added commit messages for topic listener
- EOF error in RecvMsg is no longer logged
- Changed result type of method
query.Executor.QueryResultSetfromquery.ResultSettoquery.ClosableResultSet - Added
table/types.DecimalValueFromStringdecimal type constructor
- Added log topic writer ack
- Replaced
operation.Client.Listto five methods for listing operationsoperation.List{BuildIndex,ImportFromS3,ExportToS3,ExportToYT,ExecuteQuery}
- Changed log message about send topic message
- Added experimental support for executing scripts over query service client (
query.Client.ExecuteScriptandquery.CLient.FetchScriptResults) - Removed tx result from
query.Session.Execute(tx can be obtained fromquery.Session.Begin) - Changed behaviour of
query.Session.Begintonoopfor lazy initialization with first callquery.TxActor.Execute - Splitted experimental method
query.Client.Executeto methodsquery.Client.Execwithout result andquery.Client.Querywith result - Splitted experimental method
query.TxActor.Executeto methodsquery.TxActor.Execwithout result andquery.TxActor.Querywith result - Renamed experimental method
query.Client.ReadResultSettoquery.Client.QueryResultSet - Renamed experimental method
query.Client.ReadRowtoquery.Client.QueryRow - Removed experimental methods
query.Session.ReadResultSetandquery.Session.ReadRows - Removed experimental methods
query.TxActor.ReadResultSetandquery.TxActor.ReadRows - Removed experimental method
query.Client.Stats - Option
query.WithIdempotent()allowed forquery.Client.{Exec,Query,QueryResultSet,QueryRow}methods now - Added experimental support for operation service client through
db.Operation()method (supports methodsGet,List,CancelandForget)
- Replaced requirements from go1.22 + experimantal flag to go1.23 for experimental range-over interface
- Fixed out of index item creation in
internal/pool.Pool - Fixed tracing of
(*grpcClientStream).finishevent
- Added traces and logs for read messages from topic within transaction
- Changed result type of
query.Session.NodeID()fromint64touint32for compatibility with table session and discovery - Removed experimental method
query.Result.Err() - Added the finishing reading the grpc stream on
query.Result.Close()call - Renamed experimental method
query.Result.Range()toquery.Result.ResultSets() - Renamed experimental method
query.ResultSet.Range()toquery.ResultSet.Rows() - Removed support of
go1.20 - Added PopMessages from topic within transaction
- Changed interface
table.TransactionIdentifier(added private method) for prohibition of any implementations outside ydb-go-sdk
- Fixed bug with nil pointer dereference on trace callback from
query.createSession - Fixed test message builder, now all method return itself pointer
- Fixed handle reconnection timeout error
- Fixed experimental topic listener handle stop partition event
- Fixed
query.WithCommit()flag behaviour fortx.Executein query service - OAuth 2.0 token exchange: allowed multiple resource parameters in according to https://www.rfc-editor.org/rfc/rfc8693
- Added experimental topic listener implementation
- Fixed
internal/xstrings.Buffer()leak without callbuffer.Free() - Removed double quotas from goroutine labels background workers for prevent problem with pprof
- Fixed build for go1.20
- Fixed return more than one row error if real error raised on try read next row
- Fixed checking errors for session must be deleted
- Changed signature of filter func in balancers (replaced argument from
conn.Conntype toendpoint.Info)
- Improve config validation before start topic reader
- Added metrics over
db.Table().Do()anddb.Table().DoTx() - Added method
ydb.ParamsBuilder().Param(name).Any(value)to add customtypes.Value - Upgraded dependencies:
google.golang.org/grpc- fromv1.57.1tov1.62.1github.com/google/uuid- fromv1.3.0tov1.6.0golang.org/x/sync- fromv0.3.0tov0.6.0
- Fixed goroutine leak on close reader
- Fixed topic reader and writer WaitInit hunging on unretriable connection error
- Added
query.Client.Stats()method - Added
query.Result.Stats()method - Added
query.ResultSet.Index()method - Support loading OAuth 2.0 token exchange credentials provider from config file
- Added options for JWT tokens for loading EC private keys and HMAC secrets
- Add retries to OAuth 2.0 token exchange credentials
- Fixed bug with reading empty result set parts.
- Fixed nil pointer dereference when closing result set
- Fixed bug with fail cast of grpc response to
operation.{Response,Status}
- Removed check the node is available for query and table service sessions
- Refactored the
balancers.PreferLocations()function - it is a clean/pure function - Added experimental
balancers.WithNodeID()context modifier for define per request the YDB endpoint by NodeID - Reverted the allowing the casts from signed YDB types to unsigned destination types if source value is not negative
- Replaced internal query session pool by default to stub for exclude impact from internal/pool
- Added description to scan errors with use query service client scanner
- Allowed the use of DSN without specifying the protocol/scheme
- Allowed casts from signed YDB types to unsigned destination types if source value is not negative
- Removed public
query.TxIdentifierinterface for exclude any external implementations for use with YDB
- Added experimental range functions to the
query.Resultandquery.ResultSettypes, available as for-range loops starting with Go version 1.22. These features can be enabled by setting the environment variableGOEXPERIMENT=rangefunc. - Added public types for
tx.Option,options.DoOptionandoptions.DoTxOption
- Changed
query.DefaultTxControl()fromquery.SerializableReadWrite()with commit toquery.NoTx()
- Added experimental
retry.DoWithResultandretry.DoTxWithResulthelpers for retry lambda and return value from lambda
- Excluded
Query()method from interfaceydb.Connection. MethodQuery()remains accessible fromydb.Driver
- Added
query/ResultSet.{Columns,ColumnTypes}methods for get column names and types from query result set - Added experimental
retry.RetryWithResulthelper for retry lambda and return value from lambda
- Fixed
config.WithDatabasebehaviour with empty database in DSN string - Added experimental method
query/Client.Executefor execute query and read materialized result
- Added experimental method for execute query and read only one row from result:
query/Client.ReadRowquery/Session.ReadRowquery/Transaction.ReadRow
- Added experimental method for execute query and read only one result set from result:
query/Client.ReadResultSetquery/Session.ReadResultSetquery/Transaction.ReadResultSet
- Added experimental
sugar.UnmarshallRow[T]andsugar.UnmarshallResultSet[T]helpers for converts YDB rows to typed objects
- Downgraded minimal version of Go to 1.20
- Refactored internal packages by
ifshortlinter issues
- Added experimental
ydb.{Register,Unregister}DsnParserglobal funcs for register/unregister external custom DSN parser forydb.Openandsql.Opendriver constructor - Simple implement option WithReaderWithoutConsumer
- Fixed bug: topic didn't send specified partition number to a server
- Fixed incorrect formatting of decimal. Implementation of decimal has been reverted to latest working version
- Fixed race of stop internal processes on close topic writer
- Fixed goroutines leak within topic reader on network problems
- Added
ydb.WithNodeAddressMutatorexperimental option for mutate node addresses fromdiscovery.ListEndpointsresponse - Added type assertion checks to enhance type safety and prevent unexpected panics in critical sections of the codebase
- Fixed the OAuth2 test
- Added
trace.DriverConnStreamEventsdetails bit - Added
trace.Driver.OnConnStreamFinishevent
- Added flush messages from buffer before close topic writer
- Added Flush method for topic writer
- Added experimental package
retry/budgetfor limit second and subsequent retry attempts - Refactored internals for enabling
containedctxlinter - Fixed the hanging semaphore issue on coordination session reconnect
- Fixed data race in
internal/conn.grpcClientStream
- Fixed data race using
log.WithNames
- Updated dependency
ydb-go-genproto - Added processing of
Ydb.StatusIds_EXTERNAL_ERRORinretry.Retry
- Supported OAuth 2.0 Token Exchange credentials provider
- Supported
table.Session.RenameTablesmethod - Fixed out of range panic if next query result set part is empty
- Updated the indirect dependencies
golang.org/x/nettov0.17.0andgolang.org/x/systov0.13.0due to vulnerability issue
- Added versioning policy
- Restored
WithSessionPoolKeepAliveMinSizeandWithSessionPoolKeepAliveTimeoutfor backward compatibility. - Fixed leak timers
- Changed default StartTime (time of retries for connect to server) for topic writer from 1 minute to infinite (can be overrided by WithWriterStartTimeout topic option)
- Added
Structsupport forVariantinydb.ParamsBuilder() - Added
gowith anonymous function case ingstack
- Changed default transaction control to
NoTxfor execute query through query service client
- Renamed
db.Coordination().CreateSession()todb.Coordination().Session()for compatibility with protos
- Added
Tuplesupport forVariantinydb.ParamsBuilder()
- Added additional traces for coordination service client internals
- Added experimental support of semaphores over coordination service client
- Fixed
gstacklogic for parsingast.BlockStmt
- Added internal
gstackcodegen tool for fillingstack.FunctionIDwith value from call stack
- Fixed updating last usage timestamp for smart parking of the conns
- Added
Structsupport forydb.ParamsBuilder() - Added support of
TzDate,TzDateTime,TzTimestamptypes inydb.ParamsBuilder() - Added
trace.Query.OnTransactionExecuteevent - Added query pool metrics
- Fixed logic of query session pool
- Changed initialization of internal driver clients to lazy
- Removed
ydb.WithSessionPoolSizeLimit()option - Added async put session into pool if external context is done
- Dropped intermediate callbacks from
trace.{Table,Retry,Query}events - Wrapped errors from
internal/pool.Pool.getItemas retryable - Disabled the logic of background grpc-connection parking
- Improved stringification for postgres types
- Added
trace.Query.OnSessionBeginevent - Added
trace.Query.OnResult{New,NextPart,NextResultSet,Close}events - Added
trace.Query.OnRow{Scan,ScanNamed,ScanStruct}events
- Dropped all deprecated callbacks and events from traces
- Added
trace.Driver.OnConnStream{SendMsg,RecvMsg,CloseSend}events - Added
trace.Query.OnSessionExecuteevent
- Changed
Listconstructor fromydb.ParamsBuilder().List().Build().Build()toydb.ParamsBuilder().BeginList().EndList().Build() - Changed
Setconstructor fromydb.ParamsBuilder().Set().Build().Build()toydb.ParamsBuilder().BeginSet().EndSet().Build() - Changed
Dictconstructor fromydb.ParamsBuilder().Dict().Build().Build()toydb.ParamsBuilder().BeginDict().EndDict().Build() - Changed
Optionalconstructor fromydb.ParamsBuilder().Set().Build().Build()toydb.ParamsBuilder().BeginOptional().EndOptional().Build() - Added events into
trace.Querytrace - Rewrote
internal/poolto buffered channel - Added
internal/xcontext.WithDone() - Added
internal/xsync.{OnceFunc,OnceValue} - Updated
google.golang.org/protobuffromv1.31.0tov.33.0 - Added
ydb.ParamsBuilder().Pg().{Value,Int4,Int8,Unknown}for postgres arguments - Added
Tuplesupport forydb.ParamsBuilder()
- Added client pid to each gRPC requests to YDB over header
x-ydb-client-pid - Added
ydb.WithApplicationNameoption - Added
Dictsupport forydb.ParamsBuilder()
- Added metrics over query service internals
- Added session create and delete events into
trace.Query - Moved public type
query.SessionStatusintointernal/querypackage
- Fixed cases when some option is nil
- Added logs over query service internals
- Changed
trace.Queryevents - Changed visibility of
query.{Do,DoTx}Optionsfrom public to private
- Added experimental implementation of query service client
- Fixed sometime panic on topic writer closing
- Added experimental query parameters builder
ydb.ParamsBuilder() - Changed types of
table/table.{QueryParameters,ParameterOption}to aliases oninternal/params.{Parameters,NamedValue} - Fixed bug with optional decimal serialization
- Fixed return private error for commit to stopped partition in topic reader.
- Stopped wrapping err error as transport error at topic streams (internals)
- Fixed fixenv usage (related to tests only)
- Fixed handle of operational errors in topic streams
- The minimum version of Go in
ydb-go-sdkhas been raised togo1.21 - Fixed topic writer infinite reconnections in some cases
- Refactored nil on err
internal/grpcwrapper/rawydb/issues.go, when golangci-lint nilerr enabled - Refactored nil on err
internal/grpcwrapper/rawtopic/describe_topic.go, when golangci-lint nilerr enabled
- Fixed handle of operational errors in topic streams (backported fix only)
- Fixed init info in topic writer, when autoseq num turned off.
- Supported column name prefix
__discard_column_for discard columns in result sets - Made
StatusIds_SESSION_EXPIREDretriable for idempotent operations
- Refactored
internal/value/intervalValue.Yql() - The minimum version of Go in
ydb-go-sdkhas been raised togo1.20
- Added per message metadata support for topic api
- Context for call options now have same lifetime as driver (previous - same lifetime as context for call Open function).
- Extended metrics (fill database.sql callbacks, recognize TLI error)
- Refactored config prefix in metrics
- Removed excess status labels from metrics
- Implement
fmt.Stringerinterface forDriverstruct
- Added context to some internal methods for better tracing
- Added
trace.FunctionIDhelper andFunctionIDfield to trace start info's - Replaced lazy initialization of ydb clients (table, topic, etc.) to explicit initialization on
ydb.Openstep
- Fixed inconsistent labels in
metrics
- Allowed
sql.LevelSerializableisolation level in read-write mode indatabase/sqltransactions - Refactored traces and metrics
- Added
{retry,table}.WithLabeloptions for mark retriers calls - Added
ydb.WithTraceRetryoption - Moved
internal/allocator.Buffersto packageinternal/xstring - Bumped
golang.org/x/synctov0.3.0 - Bumped
google.golang.org/protobuftov1.31.0 - Bumped
google.golang.org/grpctov1.57.1 - Allowed grpc status error as arg in
internal/xerrors.TransportError(err) - Added
interanl/xtest.CurrentFileLine()helper for table tests - Added
internal/credentials.IsAccessError(err)helper for check access errors - Changed period for re-fresh static credentials token from
1/2to1/10to expiration time - Added
table.SnapshotReadOnlyTxControl()helper for get transaction control with snapshot read-only
- Downgrade
golang.org/x/netfrom0.17.0to0.15.0 - Downgrade
golang.org/x/sysfromv0.13.0tov0.12.0 - Downgrade
golang.org/x/cryptofromv0.14.0tov0.13.0
- Refactored credentials options (from funcs to interfaces and types)
- Fixed stringification of credentials object
- Fixed panic when try to unwrap values with more than 127 columns with custom ydb unmarshaler
- Bumps
github.com/ydb-platform/ydb-go-genprotofor supportqueryservice - Bumps
golang.org/x/netfrom0.7.0to0.17.0 - Bumps
golang.org/x/sysfromv0.5.0tov0.13.0 - Bumps
golang.org/x/textfromv0.7.0tov0.13.0
- Removed
internal/backoff.Backoff.Waitinterface method for exclude resource leak with bug-provoked usage oftime.Aftermethod - Marked as deprecated
retry.WithDoRetryOptionsandretry.WithDoTxRetryOptions - Added receiving first result set on construct
internal/table/scanner.NewStream() - Added experimental package
metricswith SDK metrics - Fixed redundant trace call for finished
database/sqltransactions - Added repeater event type to wake-up func context
- Refactored default logger format
- Refactored
internal/conn.coonErrorformat - Fixed data race on
internal/conn.conn.ccaccess
- Removed almost all experimental marks from topic api.
- Rename some topic APIs (old names was deprecated and will be removed in one of next versions).
- Deprecated topic options (the option will be removed): min size of read messages batch
- Deprecated WithOnWriterFirstConnected callback, use Writer.WaitInitInfo instead.
- Changed topic Codec base type from int to int32 (was experimental code)
- Added
WaitInitandWaitInitInfomethod to the topic reader and writer - Remove extra allocations in
types.TupleValue,types.ListValueandtypes.SetValue
- Removed support of placeholder "_" for ignoring columns in
database/sqlresult sets
- Merged
internal/xsql/conn.{GetTables,GetAllTables}methods forDRY - Replaced
internal/xsql.Connector.PathNormalizerdefault fromnopPathNormalizertobind.TablePathPrefixwith database name as path prefix - Supported placeholder "_" for ignored column names in
database/sqlresult sets
- Added
table.Session.CopyTablesmethod - Added
x-ydb-trace-idheader into grpc calls - Improved topic reader logs
- Fixed
internal/xstringpackage with deprecated warning ingo1.21aboutreflect.{String,Slice}Header
- Added
internal/xstring.{FromBytes([]byte),ToBytes(string)for increase performance onstringfrom/to[]byteconversion
- Added
table/options.ReadFromSnapshot(bool)option forsession.StreamReadTable()
- Added checking condition for
tx.Rollback()inretry.DoTx
- Added node info to grpc errors
- Added methods
TotalCPUTime()andTotalDuration()totable/stats/QueryStatsinterface - Added check if commit order is bad in sync mode
- Added
table.options.WithIgnoreTruncatedoption forsession.Executemethod - Added
table.result.ErrTruncatederror for check it witherrors.Is()outside ofydb-go-sdk
- Added
table.Session.ReadRowsmethod for getting rows by keys - Added
table/options.ChangefeedFormatDynamoDBStreamsJSONformat ofDynamoDBchange feeds
- Fixed
sugar.RemoveRecursive()for column table type
- Added
sugar.StackRecord()helper for stringification of current file path and line - Updated
google.golang.org/grpcfromv1.49.0tov1.53.0due to vulnerability - Updated
google.golang.org/protobuffromv1.28.0tov1.28.1due to vulnerability - Implemented implicit standard interface
driver.RowsColumnTypeNullableininternal/xsql.rows - Upgraded errors description from
retry.Retrywith attempts info
- Added builder for topic reader message (usable for tests)
- Removed
log.Secrethelper as unnessesarry in public API after refactoring logging subsystem - Enriched the error with important details from initial discovery
- Added
internal.{secret,stack}packages - Implemented
fmt.Stringerinterface in credential types
- Added
ydb.IsOperationErrorTransactionLocksInvalidated(err)helper for checksTLIflag in err
- Added
table/types.IsOptional()helper
- Refactored tests
- Added
sugar.Is{Entry,ColumnTable}Existshelper
- Fixed stopping topic reader by grpc stream shutdown
- Fixed
database/sqldriver for get and parse container ydb types - Changed
table/scanner.scanner.Any()behaviour: for non-primitive types returns rawtable/types.Valueinstead nil from previous behaviour - Added
table/types.{ListItems,VariantValue,DictValues}helpers for get internal content of abstracttable/types.Value - Marked as deprecated
table/types.DictFields(usetable/types.DictValuesinstead)
- Added
scheme.Entry.IsColumnTable()helper
- Disabled check of node exists with
balancers.SingleConn - Improved code with
go-criticlinter - Added session info into
database/sqleventconnected
- Added
table/options.Description.Tieringfield
- Refactored
internal/cmd/gtracetool (prefer pointers instead trace struct copies) for bust performance - Fixed usage of generated traces in code
- Removed test artifacts from repository
- Added
table/types.ToDecimal()converter fromtable/types.Valuetotable/types.Decimal
- Implemented
internal/xcontext.With{Cancel,Timeout}with stack record and switched all usages from standardcontext.With{Cancel,Timeout}
- Refactored package
logfor support typed fields in log messages
- Added
table/options.WithPartitionsfor configure partitioning policy - Marked as deprecated
table/options.WithPartitioningPolicy{UniformPartitions,ExplicitPartitions}(usetable/options.With{UniformPartitions,ExplicitPartitions}instead)
- Fixed bug of processing endpoint with
node_id=0 - Refactored of checking node ID in cluster discovery before
Getand during inPutof session into session pool
- Removed debug print
- Fixed bug with returning session into pool before second discovery
- Added
table/options.WithCallOptionsoptions for append custom grpc call options intosession.{BulkUpsert,Execute,StreamExecuteScanQuery} - Supported fake transactions in
database/sqldriver over connector optionydb.WithFakeTx(queryMode)and connection string paramgo_fake_tx - Removed
testutil/timeutilpackage (all usages replaced withclockworkpackage) - Changed behaviour of retryer on transport errors
cancelledanddeadline exceeded- will retry idempotent operation if context is not done - Added address of node to operation error description as optional
- Fixed bug with put session from unknown node
- Fixed bug with parsing of
TzTimestampwithout microseconds - Fixed code -1 of retryable error if wrapped error with code
- Added
ydb.MustOpenandydb.MustConnectorhelpers - Fixed
internal/xerrors.Transporterror wrapping for case when given error is not transport error - Added grpc and operation codes to errors string description
- Extend
scheme.Clientinterface with methodDatabase - Removed
driver.ResultNoRowsininternal/xsql - Added
ydb.{WithTablePathPrefix,WithAutoDeclare,WithPositionalArgs,WithNumericalArgs}query modifiers options - Supported binding parameters for
database/sqldriver over connector optionydb.WithAutoBind()and connection string paramsgo_auto_bind={table_path_prefix(path),declare,numeric,positional} - Added
testutil.QueryBindtest helper - Fixed topic retry policy callback call: not call it with nil error
- Fixed bug with no checking operation error on
discovery.Clientcalls - Allowed zero create session timeout in
ydb.WithSessionPoolCreateSessionTimeout(timeout)(less than or equal to zero - no used timeout on create session request) - Added examples with own
go.mod - Marked as deprecated
ydb.WithErrWriter(w)andydb.WithOutWriter(w)logger options - Added
ydb.WithWriter(w)logger option
Small broken changes
Most users can skip there notes and upgrade as usual because build break rare used methods (expiremental API and api for special cases, not need for common use YDB) and this version has no any behavior changes.
Changes for experimental topic API:
- Moved
producer_idfrom required positional argument to optionWithProducerID(and it is optional now) - Removed
WithMessageGroupIDoption (because not supported now)
Changes in ydb connection:
- Publish internal private struct
ydb.connectionasydb.Driver(it is implementydb.Connection) ydb.Connectionmarked as deprecated- Changed return type of
ydb.Open(...)fromydb.Connectionto*ydb.Driver - Changed return type of
ydb.New(...)fromydb.Connectionto*ydb.Driver - Changed argument type for
ydb.GRPCConnfromydb.Connectionto*ydb.Driver - Removed method
Withfromydb.Connection(use*Driver.Withinstead).
Changes in package sugar:
- Changed a type of database arg in
sugar.{MakeRecursive,RemoveRecursive}fromydb.Connectionto minimal required local interface
Dependencies:
- Up minimal supported version of
goto1.17for update dependencies (newgolang.org/xdoesn't compiled forgo1.16) - Upgrade
golang.org/x/...for prevent issues:CVE-2021-33194,CVE-2022-27664,CVE-2021-31525,CVE-2022-41723
- Fixed checking
nilerror withinternal/xerrors.Is
- Supported
scheme.EntryTopicpath child entry insugar.RemoveRecursive
- Fixed default state of
internal/xerrors.retryableError: it inherit properties from parent error as possible - Marked event
grpc/stats.Endas ignored at observing status of grpc connection
- Replaced the balancer connection to discovery service from short-lived grpc connection to
internal/connlazy connection (revert related changes fromv3.42.6) - Marked as deprecated
trace.Driver.OnBalancerDialEntrypointevent callback - Deprecated
trace.Driver.OnConnTakeevent callback - Added
trace.Driver.OnConnDialevent callback
- Fixed validation error for
topicoptions.WithPartitionIDoption of start topic writer.
- Added exit from retryer if got grpc-error
Unauthenticatedondiscovery/ListEndpointscall
- Added
internal/xerrors.Errorferror for wrap multiple errors and check them witherrors.Isoferrors.As - Fixed corner cases of
internal/wait.Wait - Added check of port in connection string and error throw
- Fixed bug with initialization of connection pool before apply static credentials
- Refactored of applying grpc dial options with defaults
- Added
trace.Driver.{OnBalancerDialEntrypoint,OnBalancerClusterDiscoveryAttempt}trace events - Fixed compilation of package
internal/xresolverwithgoogle.golang.org/grpc@v1.53 - Fixed returning
io.EOFonrows.Nextandrows.NextResultSet - Added wrapping of errors from unary and stream results
- Added error throw on
database/sql.Conn.BeginTx(),*sql.Tx.ExecContextand*sql.Tx.QueryContextif query mode is notydb.DataQueryMode - Added test for
database/sqlscan-query
- Fixed
internal/scheme/helpers/IsDirectoryExists(..)recursive bug
- Fixed
sugar.IsTableExistswith recursive check directory exists - Added
sugar.IsDirectoryExists - Changed type of
table/options.IndexTypefor type checks - Added constants
table/options.IndexTypeGlobalandtable/options.IndexTypeGlobalAsync - Added
table/options.IndexDescription.Typefield withtable/options.IndexTypetype
- Implemented
driver.RowsColumnTypeDatabaseTypeNameinterface ininternal/xsql.rowsstruct - Extended
internal/xsql.connstruct with methods for gettingYDBmetadata - Added
scheme.Clienttointernal/xsql.connectioninterface - Added
helperspackage with method for checking existence of table, refactoredsugar.IsTableExists() - Added checks for nil option to all opts range loops
- Moved content of package
internal/ctxlabelsintointernal/xcontext - Implemented
GRPCStatusmethod ininternal/xerrors/transportError - Added different implementations of stacktrace error for grpc errors and other
- Dropped
internal/xnetpackage as useless - Fixed default grpc dial options
- Replaced single connection for discovery repeater into connection which creates each time for discovery request
- Fixed retry of cluster discovery on initialization
- Fixed dial timeout processing
- Fixed closing of
database/sqlconnection (akaYDBsession) - Made
session.Close()asnopfor idled session - Implemented goroutine for closing idle connection in
database/sqldriver - Separated errors of commit from other reader and to expired session
- Fixed wrapping error in
internal/balancer/Balancer.wrapCall()
- Added
ydb.WithDisableServerBalancer()database/sql connector option
- Added
credentials.NewStaticCredentials()static credentials constructor - Changed
internal/credentials.NewStaticCredentials()signature and behaviour for create grpc connection on each call to auth service - Downgrade
google.golang.org/grpctov1.49.0
- Added
trace.Details.Details()method for use external detailer
- Fixed lazy transaction example for
godoc
- Added retry policy options for topics:
topic/topicoptions.WithReaderCheckRetryErrorFunction,topic/topicoptions.WithReaderStartTimeout,topic/topicoptions.WithWriterCheckRetryErrorFunction,topic/topicoptions.WithWriterStartTimeout - Refactored
internal/connmiddlewares - Added
trace.tableSessionInfo.LastUsage()method for get last usage timestamp - Reverted
tx.WithCommit()changes for fix unstable behaviour of lazy transactions - Added
options.WithCommit()option for execute query with auto-commit flag - Removed
trace.TableTransactionExecuteStartInfo.KeepInCachefield as redundant
- Added option for set interval of auth token update in topic streams
- Supported internal allocator in
{session,statement}.Executefor decrease memory usage - Fixed typo in
topic/README.md - Upgraded
ydb-go-genprotodependency - Fixed duplicating of traces in
table.Client.Do()call - Supported
table.Transaction.WithCommit()method for execute query and auto-commit after - Added
DataColumnstotable.options.IndexDescription - Added
scheme.EntryColumnStoreandscheme.EntryColumnColumnentry types - Added
table.options.WithPartitioningBy(columns)option
- Added constructor of
options.TimeToLiveSettingsand fluent modifiers
- Added
options.WithAddAttributeandoptions.WithDropAttributeoptions forsession.AlterTablerequest - Added
options.WithAddIndexandoptions.WithDropIndexoptions forsession.AlterTablerequest - Added return error while create topic writer with not equal producer id and message group id.
- Added package
metawith methods aboutYDBmetadata - Added
meta.WithTrailerCallback(ctx, callback)context modifier for attaching callback function which will be called on incoming metadata - Added
meta.ConsumedUnits(metadata.MD)method for getting consumed units from metadata - Added
NestedCallfield to retry trace start infos for alarm on nested calls - Added
topicoptions.WithWriterTraceoption for attach tracer into separated writer - Added
sugar.IsTableExists()helper for check existence of table
- Removed message level partitioning from experimental topic API. It is unavailable on server side yet.
- Supported
NullValuetype as received type fromYDB - Supported
types.SetValuetype - Added
types.CastTo(types.Value, destination)public method for casttypes.Valueto golang native type value destination - Added
types.TupleItem(types.Value),types.StructFields(types.Value)andtypes.DictValues(types.Value)funcs (extractors of internal fields of tuple, struct and dict values) - Added
types.Value.Yql()func for getting values string representation asYQLliteral - Added
types.Type.Yql()func for gettingYQLrepresentation of type - Marked
table/types.WriteTypeStringToas deprecated - Added
table/options.WithDataColumnsfor supporting covering indexes - Supported
balancerquery string parameter inDSN - Fixed bug with scanning
YSONvalue from result set - Added certificate caching in
WithCertificatesFromFileandWithCertificatesFromPem
- Fixed bug from scan unexpected column name
- Changed type of
table/options.{Create,Alter,Drop}TableOptionfrom func to interface - Added implementations of
table/options.{Create,Alter,Drop}Option - Changed type of
topic/topicoptions.{Create,Alter,Drop}Optionfrom func to interface - Added implementations of
topic/topicoptions.{Create,Alter}Option - Fix internal race-condition bugs in internal background worker
- Added retries to initial discovering
- Added missing
RetentionPeriodparameter for topic description - Fixed reconnect problem for topic client
- Added queue limit for sent messages and split large grpc messages while send to topic service
- Improved control plane for topic services: allow list topic in schema, read cdc feeds in table, retry on contol plane operations in topic client, full info in topic describe result
- Allowed writing zero messages to topic writer
- Fixed deadlock with implicit usage of
internal.table.Client.internalPoolAsyncCloseSession
- Fixed commit errors for experimental topic reader
- Updated
ydb-go-genprotodependency - Added
table.WithSnapshotReadOnly()TxOptionfor supportingSnapshotReadOnlytransaction control - Fixed bug in
db.Scripting()queries (not checked operation results) - Added
sugar.ToYdbParam(sql.NamedArg)helper for convertingsql.NamedArgtotable.ParameterOption - Changed type
table.ParameterOptionfor getting name and value fromtable.ParameterOptioninstance - Added topic writer experimental api with internal logger
- Refactored the internal closing behaviour of table client
- Implemented the
sql.driver.Validatorinterface - Fixed update token for topic reader
- Marked sessions which creates from
database/sqldriver as supported server-side session balancing
- Changed type of truncated result error from
StreamExecuteScanQueryto retryable error - Added closing sessions if node removed from discovery results
- Moved session status type from
table/optionspackage totable - Changed session status source type from
uint32tostringalias
- Added to balancer notifying mechanism for listening in table client event about removing some nodes and closing sessions on them
- Removed from public client interfaces
closer.Closer(for exclude undefined behaviour on client-side)
- Refactoring of
xsqlerrors checking
- Revert the marking of context errors as required to delete session
- Fixed alter topic request - stop send empty setSupportedCodecs if customer not set them
- Marked the context errors as required to delete session
- Added log topic api reader for internal logger
- Fixed nil pointer exception in topic reader if reconnect failed
- Refactored the
xsql.badconn.Error
- Supported read-only
sql.LevelSnapshotisolation with fake transaction andOnlineReadOnlytransaction control (transient, while YDB clusters are not updated with true snapshot isolation mode) - Supported the
*sql.Connas input typeydb.Unwraphelper for go's 1.18
- Changed output of
sugar.GenerateDeclareSection(added error as second result) - Specified
sugar.GenerateDeclareSectionforgo1.18(supports input types*table.QueryParameters[]table.ParameterOptionor[]sql.NamedArg) - Supports different go's primitive value types as arg of
sql.Named("name", value) - Added
database/sqlexample and docs
- Fixed
xsql.Rowserror checking
- Changed behavior on
result.Err()on truncated result (returns non-retryable error now, excludeStreamExecuteScanQuery) - Added
ydb.WithIgnoreTruncatedoption for disabling errors on truncated flag - Added simple transaction control constructors
table.OnlineReadOnlyTxControl()andtable.StaleReadOnlyTxControl() - Added transaction control specifier with context
ydb.WithTxControl - Added value constructors
types.BytesValue,types.BytesValueFromString,types.TextValue - Removed auto-prepending declare section on
xsqlqueries - Supports
time.Timeas type destination inxsqlqueries - Defined default dial timeout (5 seconds)
- Removed the deprecation warning for
ydb.WithSessionPoolIdleThresholdoption
- Replaced internal table client background worker to plain wait group for control spawned goroutines
- Replaced internal table client background session keeper to internal background session garbage collector for idle sessions
- Extended the
DescribeTopicResultstruct
- Added some description to error message from table pool get
- Moved implementation
sugar.GenerateDeclareSectiontointernal/table - Added transaction trace callbacks and internal logging with them
- Stored context from
BeginTxtointernal/xsqltransaction - Added automatically generated declare section to query text in
database/sqlusage - Removed supports
sql.LevelSerializable - Added
retry.Dohelper for retry custom lambda withdatabase/sqlwithout transactions - Removed
retry.WithTxOptionsoption (only default isolation supports)
- Changed
database/sqldriverpreparebehaviour tonopwith proxing call to conn exec/query with keep-in-cache flag - Added metadata to
trace.Driver.OnInvokeandtrace.Driver.OnNewStreamdone events
- Improved the
xsqlerrors mapping todriver.ErrBadConn - Extended
retry.DoTxtest for to achieve equivalence withretry.Retrybehaviour - Added
database/sqlevents for tracingdatabase/sqldriver events - Added internal logging for
database/sqlevents - Supports
YDB_LOG_DETAILSenvironment variable for specify scope of log messages - Removed support of
YDB_LOG_NO_COLORenvironment variable - Changed default behaviour of internal logger to without coloring
- Fixed coloring (to true) with environment variable
YDB_LOG_SEVERITY_LEVEL - Added
ydb.WithStaticCredentials(user, password)option for make static credentials - Supports static credentials as part of connection string (dsn - data source name)
- Changed minimal supported version of go from 1.14 to 1.16 (required for jwt library)
- Added
retry.DoTxhelper for retryingdatabase/sqltransactions - Implemented
database/sqldriver overydb-go-sdk - Marked as deprecated
trace.Table.OnPoolSessionNewandtrace.Table.OnPoolSessionCloseevents - Added
trace.Table.OnPoolSessionAddandtrace.Table.OnPoolSessionRemoveevents - Refactored session lifecycle in session pool for fix flaked
TestTable - Fixed deadlock in topicreader batcher, while add and read raw server messages
- Fixed bug in
db.Topic()with send response to stop partition message
- Fixed flaky TestTable
- Renamed topic events in
trace.Detailsenum
- Refactored
trace.Topic(experimental) handlers - Fixed signature and names of helpers in
topic/topicsugarpackage - Allowed parallel reading and committing topic messages
- Extended the
ydb.Connectioninterface with experimentaldb.Topic()client (control plane and reader API) - Removed
ydb.RegisterParser()function (was needed fordatabase/sqldriver outsideydb-go-sdkrepository, necessity ofydb.RegisterParser()disappeared with implementationdatabase/sqldriver in same repository) - Refactored
db.Table().CreateSession(ctx)(maked retryable with internal create session timeout) - Refactored
internal/table/client.createSession(ctx)(got rid of unnecessary goroutine) - Supported many user-agent records
- Added
ydb.RegisterParser(name string, parser func(value string) []ydb.Option)function for register parser of specified param name (supporting additional params in connection string) - Fixed writing
KeepInCacheFlagin table traces
- Fixed regression of
table/types.WriteTypeStringTo
- Added touching of last updated timestamp in existing conns on stage of applying new endpoint list
- Reverted
xerrors.IsTransportError(err)behaviour for raw grpc errors to false
- Enabled server-side session balancing for sessions created from internal session pool
- Removed unused public
meta.Metamethods - Renamed
meta.Meta.Meta(ctx)public method tometa.Meta.Context(ctx) - Reverted default balancer to
balancers.RandomChoice()
- Changed default balancer to
balancers.PreferLocalDC(balancers.RandomChoice())
- Refactored
internal/valuepackage for decrease CPU and memory workload with GC - Added
table/types.Equal(lhs, rhs)helper for check equal for two types
- Fixed false-positive node pessimization on receiving from stream io.EOF
- Upgraded dependencies (grpc, protobuf, testify)
- Marked dial errors as retryable
- Supported node pessimization on dialing errors
- Marked error from
InvokeandNewStreamas retryable if request not sended to server
- Added
sugar.GenerateDeclareSection()helper for make declare section inYQL - Added check when parameter name not started from
$and automatically prepends it to name - Refactored connection closing
- Added internal experimental packages
internal/value/expandinternal/value/exp/allocatorwith alternative value implementations with zero-allocation model - Supported parsing of database name from connection string URI path
- Added
options.WithExecuteScanQueryStatsoption - Added to query stats plan and AST
- Changed behaviour of
result.Stats()(if query result have no stats - returnsnil) - Added context cancel with specific error
- Added mutex wrapper for mutex, rwmutex for guarantee unlock and better show critical section
- Fixed syntax mistake in
trace.TablePooStateChangeInfototrace.TablePoolStateChangeInfo
- Fixed bug with convert ydb value to
time.Durationinresult.Scan[WithDefaults,Named]() - Fixed bug with make ydb value from
time.Durationintypes.IntervalValueFromDuration(d) - Marked
table/types.{IntervalValue,NullableIntervalValue}as deprecated
- Removed the processing of trailer metadata on stream calls
- Updated the
ydb-go-genprotodependency
- Defined the
SerializableReadWriteisolation level by default indb.Table.DoTx(ctx, func(ctx, tx)) - Updated the
ydb-go-genprotodependency
- Disabled the
KeepInCachepolicy for queries without params
- Updated the indirect dependency to
gopkg.in/yaml.v3
- Removed
Deprecatedmark fromtable/session.Preparemethod - Added comments for
table/session.Executemethod
- Refactored of making permissions from scheme entry
- Removed deprecated traces
- Fixed data race on session stream queries
- Renamed
internal/routerpackage tointernal/balancerfor unambiguous understanding of package mission - Implemented detection of local data-center with measuring tcp dial RTT
- Added
trace.Driver.OnBalancer{Init,Close,ChooseEndpoint,Update}events - Marked the driver cluster events as deprecated
- Simplified the balancing logic
- Changed primary license to
Apache2.0for auto-detect license - Refactored
types.Structvalue creation
- Fixed repeater initial force timeout from 500 to 0.5 second
- Fixed bug with unexpected failing of call
InvokeandNewStreamon closed cluster - Fixed bug with releasing
internal/conn/conn.Poolin cluster - Replaced interface
internal/conn/conn.Poolto structinternal/conn/conn.Pool
- Added
ydb.GRPCConn(ydb.Connection)helper for connect to driver-unsupported YDB services - Marked as deprecated
session.Preparecallback - Marked as deprecated
options.WithQueryCachePolicyKeepInCacheandoptions.WithQueryCachePolicyoptions - Added
options.WithKeepInCacheoption - Enabled by default keep-in-cache policy for data queries
- Removed from
ydb.Connectionembedding ofgrpc.ClientConnInterface - Fixed stopping of repeater
- Added log backoff between force repeater wake up's (from 500ms to 32s)
- Renamed
trace.DriverRepeaterTick{Start,Done}Infototrace.DriverRepeaterWakeUp{Start,Done}Info - Fixed unexpected
NullFlagwhile parse nilJSONDocumentvalue - Removed
internal/conn/conn.streamUsagesandinternal/conn/conn.usages(internal/conn.connalways touching last usage timestamp on API calls) - Removed auto-reconnecting for broken conns
- Renamed
internal/databasepackage tointernal/routerfor unambiguous understanding of package mission - Refactored applying actual endpoints list after re-discovery (replaced diff-merge logic to swap cluster struct, cluster and balancers are immutable now)
- Added
trace.Driver.OnUnpessimizeNodetrace event
- Changed default balancer to
RandomChoice()becausePreferLocalDC()balancer works incorrectly with DNS-balanced callDiscovery/ListEndpoints
- Refactored initialization of coordination, ratelimiter, scheme, scripting and table clients from
internal/lazypackage to each client initialization withsync.Once - Removed
internal/lazypackage - Added retry option
retry.WithStackTracefor wrapping errors with stacktrace
- Fixed re-opening case after close lazy-initialized clients
- Removed dependency of call context for initializing lazy table client
- Added
config.AutoRetry()flag withtruevalue by default.config.AutoRetry()affects how to errors handle in sub-clients calls. - Added
config.WithNoAutoRetryfor disabling auto-retry on errors in sub-clients calls - Refactored
internal/lazypackage (supported checkconfig.AutoRetry(), removed all error wrappings with stacktrace)
- Added
WithTLSConfigoption for redefine TLS config - Added
sugar.LoadCertificatesFromFileandsugar.LoadCertificatesFromPemhelpers
- Supported
json.Unmarshalertype for scanning row to values - Reimplemented
sugar.DSNwithnet/url
- Fixed gtrace tool generation code style bug with leading spaces
- Removed accounting load factor (unused field) in balancers
- Enabled by default anonymous credentials
- Enabled by default internal dns resolver
- Removed from defaults
grpc.WithBlock()option - Added
ydb.Openmethod with required param connection string - Marked
ydb.Newmethod as deprecated - Removed package
dsn - Added
sugar.DSNhelper for make dsn (connection string) - Refactored package
retry(movedretryBackoffandretryModeimplementations tointernal) - Refactored
config.Config(remove interfaceConfig, renamed private structconfigtoConfig) - Moved
discovery/configtointernal/discovery/config - Moved
coordination/configtointernal/coordination/config - Moved
scheme/configtointernal/scheme/config - Moved
scripting/configtointernal/scripting/config - Moved
table/configtointernal/table/config - Moved
ratelimiter/configtointernal/ratelimiter/config
- Fixed race condition on lazy clients first call
- Fixed gofumpt linter issue on
credentials/credentials.go
- Added
table.DefaultTxControl()transaction control creator with serializable read-write isolation mode and auto-commit - Fixed passing nil query parameters
- Fixed locking of cluster during call
cluster.Get
- Simplified README.md for godoc documentation in pkg.go.dev
- Added public package
dsnfor making piped data source name (connection string) - Marked
ydb.WithEndpoint,ydb.WithDatabase,ydb.WithSecure,ydb.WithInsecureoptions as deprecated - Moved
ydb.RegisterParserto packagedsn - Added version into all error and warn log messages
- Fixed duplicating
WithPanicCallbackproxying to table config options - Fixed comments for
xerrros.Isandxerrros.As
- Renamed internal packages
errors,netandresolvertoxerrors,xnetandxresolverfor excluding ambiguous interpretation - Renamed internal error wrapper
xerrors.Newtoxerrors.Wrap
- Added
WithPanicCallbackoption to all service configs (discovery, coordination, ratelimiter, scheme, scripting, table) and auto-applying fromydb.WithPanicCallback - Added panic recovering (if defined
ydb.WithPanicCallbackoption) which thrown from retry operation
- Refactored balancers (makes concurrent-safe)
- Excluded separate balancers lock from cluster
- Refactored
cluster.Clusterinterface (InsertandRemovereturning nothing now) - Replaced unsafe
cluster.closeboolean flag tocluster.donechan for listening close event - Added internal checker
cluster.isClosed()for check cluster state - Extracted getting available conn from balancer to internal helper
cluster.get(called insidecluster.Getas last effort) - Added checking
conn.Connavailability withconn.Ping()in prefer nodeID case
- Added
conn.Ping(ctx)method for check availability ofconn.Conn - Refactored
cluster.Cluster.Get(ctx)to return only available connection (instead of returning any connection from balancer) - Added address to error description thrown from
conn.take() - Renamed package
internal/dbtointernal/databaseto exclude collisions with variable namedb
- Added
go1.18to test matrix - Added
ydb.WithOperationTimeoutandydb.WithOperationCancelAftercontext modifiers
- Removed redundant
trace.With{Table,Driver,Retry}andtrace.Context{Table,Driver,Retry}funcs - Moved
gtracetool from./cmd/gtraceto./internal/cmd/gtrace - Refactored
gtracetool for generateComposeoptions - Added panic recover on trace calls in
Composecall step - Added
trace.With{Discovery,Driver,Coordination,Ratelimiter,Table,Scheme,Scripting}PanicCallbackoptions - Added
ydb.WithPanicCallbackoption
- Fixed bug with check acquire error over
ydb.IsRatelimiterAcquireError - Added full changelog link to github release description
- Added stacktrace to errors with issues
- Refactored
cluster.Clusterandbalancer.Balancerinterfaces (removedUpdatemethod) - Replaced
cluster.Updatewithcluster.Removeandcluster.Insertcalls - Removed
trace.Driver.OnClusterUpdateevent - Fixed bug with unexpected changing of local datacenter flag in endpoint
- Refactored errors wrapping (stackedError are not ydb error now, checking
errors.IsYdb(err)witherrors.Asnow) - Wrapped retry operation errors with
errors.WithStackTrace(err) - Changed
trace.RetryLoopStartInfo.Contexttype fromcontext.Contextto*context.Context
- Refactored internal operation and transport errors
- Added
config.ExcludeGRPCCodesForPessimization()opttion for exclude some grpc codes from pessimization rules - Refactored pessimization node conditions
- Added closing of ticker in
conn.Conn.connParker - Removed
config.WithSharedPooland usages it - Removed
conn.Creatorinterface and usage it - Removed unnecessary options append in
ydb.With
- Added closing
conn.Connif discovery client build failure - Added wrapping errors with stacktrace
- Added discharging banned state of
conn.Connoncluster.Updatestep
- Rollback moving
meta.Metacall to conn exclusively frominternal/dbandinternal/discovery - Added
WithMeta()discovery config option
- Added
config.SharedPool()setting andconfig.WithSharedPool()option - Added management of shared pool flag on change dial timeout and credentials
- Removed explicit checks of conditions for use (or not) shared pool in
ydb.With() - Renamed
internal/dbinterfaces - Changed signature of
conn.Conn.Release(added error as result)
- Removed
WithMeta()discovery config option - Moved
meta.Metacall to conn exclusively
- Replaced panic on cluster close to error issues
- Fixed bug in
types.Nullable() - Refactored package
meta - Removed explicit call meta in
db.New()
- Added
WithMeta()discovery config option - Fixed bug with credentials on discovery
- Refactored internal dns-resolver
- Added option
config.WithInternalDNSResolverfor use internal dns-resolver and use resolved IP-address for dialing instead FQDN-address
- Removed all conditions for trace retry errors
- Fixed background color of warn messages
- Added to log messages additional information about error, such as retryable (or not), delete session (or not), etc.
- Added github action for publish release tags
- Refactored version constant (split to major, minor and patch constants)
- Added
table.types.Nullable{*}Valuehelpers andtable.types.Nullable()common helper - Fixed race on check trailer on closing table grpc-stream
- Refactored traces (start and done struct names have prefix about trace)
- Replaced
errors.Error,errors.Errorfanderrors.ErrorfSkipto singleerrors.WithStackTrace - Refactored table client options
- Declared and implemented interface
errors.isYdbErrorfor checking ybd/non-ydb errors - Fixed double tracing table do events
- Added
retry.WithFastBackoffandretry.WithFastBackoffoptions - Refactored
table.CreateSessionas retry operation with options - Moved log level from root of repository to package
log - Added details and address to transport error
- Fixed
recursiveparam inratelimiter.ListResource - Added counting stream usages for exclude park connection if it in use
- Added
trace.Driverevents about change stream usage andconn.Release()call
- Implemented auto-removing
conn.Connfromconn.Poolwith counting usages ofconn.Conn - Refactored naming of source files which declares service client interfaces
- Fixed bug with update balancer element with nil handle
- Refactored internal error wrapping (with file and line identification) - replaced
fmt.Printf("%w", err)error wrapping to internalstackError
- Added
balacers.CreateFromConfigbalancer creator - Added
Createmethod to interfacebalancer.Balancer
- Added
balacers.FromConfigbalancer creator
- Fixed linter issues
- Fixed race with read/write pool conns on closing conn
- Improved error messages
- Defended
cluster.balancerwithsync.RWMutexoncluster.Insert,cluster.Update,cluster.Removeandcluster.Get - Excluded
CloseandParkmethods fromconn.Conninterface - Fixed bug with
MultibalancerCreate() - Improved
errors.IsTransportError(check a few transport error codes instead check single transport error code) - Improved
errors.Is(check a few errors instead check single error) - Refactored YDB errors checking API on client-side
- Implemented of scripting traces
- Refactored
Connectioninterface - Removed
CustomOptionand taking client with custom options - Removed
proxypackage - Improved
db.With()helper for child connections creation - Set shared
conn.Poolfor all childrenydb.Connection - Fixed bug with
RoundRobinandRandomChoicebalancersCreate()
- Added
trace.Driver.OnConnParkevent - Added
trace.Driver.OnConnCloseevent - Fixed bug with closing nil session in table retryer
- Restored repeater
Forcecall on pessimize event - Changed mutex type in
conn.Connfromsync.Mutextosync.RWMutexfor exclude deadlocks - Reverted applying empty
discoveryresults tocluster
- Added
balancers.Preferandbalancers.PreferWithFallbackconstructors
- Added
trace.Driver.OnRepeaterWakeUpevent - Refactored package
repeater
- Added
trace.ClusterInsertDoneInfo.Insertedboolean flag for notify about success of insert endpoint into balancer - Added
trace.ClusterRemoveDoneInfo.Removedboolean flag for notify about success of remove endpoint from balancer
- Reverted usage of
math/rand(insteadcrypto/rand)
- Imported tool gtrace to
./cmd/gtrace - Changed minimal version of go from 1.13 to 1.14
- Fixed composing of service traces
- Fixed end-call of
trace.Driver.OnConnStateChange
- Added
trace.EndpointInfo.LastUpdated()timestamp - Refactored
endpoint.Endpoint(split to structendopintand interfaceEndpoint) - Returned safe-thread copy of
endpoint.Endpointto trace callbacks - Added
endpoint.Endpoint.Touch()func for refresh endpoint info - Added
conn.conn.onCloseslice for call optional funcs on close step - Added removing
conn.Connfromconn.Poolonconn.Conn.Close()call - Checked cluster close/empty on keeper goroutine
- Fixed
internal.errors.Newwrapping depth - Added context flag for no wrapping operation results as error
- Refactored
trace.Driverconn events
- Removed internal alias-type
errors.IssuesIterator
- Changed
trace.GetCredentialsDoneInfotoken representation from bool to string - Added
log.Secrethelper for mask token
- Replaced meta in
proxyConnection.InvokeandproxyConnection.NewStream
- Refactored
internal/cluster.Cluster(add option for notify about external lock, lock cluster for update cluster endpoints) - Reverted
grpc.ClientConnInterfaceAPI toydb.Connection
- Replaced in
table/types/compare_test.gochecking error by error message to checking witherrors.Is()
- Wrapped internal errors in retry operations
- Excluded error wrapping from retry operations
- Added
ydb.WithTLSSInsecureSkipVerify()option - Added
trace.Table.OnPoolStateChangeevent - Wrapped internal errors with print <func, file, line>
- Removed
trace.Table.OnPoolTakeevent (unused) - Refactored
trace.Detailsmatching by string pattern - Added resolver trace callback
- Refactored initialization step of grpc dial options
- Added internal package
netwithnet.Connproxy object - Fixed closing proxy clients
- Added
ydb.Connection.With(opts ...ydb.CustomOption)for taking proxyydb.Connectionwith some redefined options - Added
ydb.MetaRequestTypeandydb.MetaTraceIDaliases to internalmetapackage constants - Added
ydb.WithCustomCredentials()option - Refactored
ydb.Ratelimiter().AcquireResource()method (added options for defining type of acquire request) - Removed single point to define operation mode params (each grpc-call with
OperationParamsmust explicit defineOperationParams) - Removed defining operation params over context
- Removed
config.RequestTimeoutandconfig.StreamTimeout(each grpc-call must manage context instead defineconfig.RequestTimeoutorconfig.StreamTimeout) - Added internal
OperationTimeoutandOperationCancelAfterto each client (ratelimiter, coordination, table, scheme, scripting, discovery) config.OperationTimeoutandOperationCancelAfterconfig params defined from root config
- Extended
trace.Detailsconstants for support per-service events - Added
trace.Discoverystruct for traces discovery events - Added
trace.Ratelimiter,trace.Coordination,trace.Scripting,trace.Schemestubs (will be implements in the future) - Added
ratelimiter/config,coordination/config,scripting/config,scheme/config,discovery/configpackages for specify per-service configs - Removed
trace.Driver.OnDiscoverycallback (moved totrace.Discovery) - Refactored initialization step (firstly makes discovery client)
- Removed
internal/lazy.Discovery(discovery client always initialized) - Fixed
trace.Tableevent structs - Refactored grpc options for define dns-balancing configuration
- Refactored
retry.Retrysignature (addedretry.WithID,retry.WithTraceandretry.WithIdempotentopt-in args, required paramisIdempotentOperationremoved) - Refactored package
internal/repeater
- Fixed data race on closing session pool
- Fixed busy loop on call internal logger with external logger implementation of
log.Logger
- Fixed
WithDiscoveryInterval()option with negative argument (must useSingleConnbalancer)
- Added
WithMinTLSVersionoption
- Removed
ydb.EndpointDatabase,ydb.ConnectionStringandydb.MustConnectionStringhelpers - Removed
ydb.ConnectParamsstruct andydb.WithConnectParamsoption creator - Added internal package
dsnfor register external parsers and parse connection string - Added
ydb.RegisterParsermethod for registering external parser of connection string
- Unwrap sub-tests called as
t.Run(...)in integration tests - Updated
grpcdependency (fromv1.38.0tov1.43.0) - Updated
protobufdependency (fromv1.26.0tov1.27.1) - Added internal retryers into
lazy.Ratelimiter - Added internal retryers into
lazy.Coordination - Added internal retryers into
lazy.Discovery - Added internal retryers into
lazy.Scheme - Added internal retryers into
lazy.Scripting - Added internal retryer into
lazy.Table.CreateSession
- Fixed version
- Fixed misspell linter issue
- Removed debug print to log
- Refactored session shutdown test
- Ignored session shutdown test if no defined
YDB_SHUTDOWN_URLSenvironment variable
- Added
ydb.WithInsecure()option
- Fixed version
- Fixed syntax error in
CHANGELOG.md
- Fixed
CHANGELOG.md
- Updated
github.com/ydb-platform/ydb-go-genproto
- Fixed
trace.Table.OnPoolDoTx- addedIdempotentflag totrace.PoolDoTxStartInfo
- Added
table.result.Result.ScanNamed()scan function - Changed connection secure to
trueby default - Renamed public package
balancertobalancers(this package contains only constructors of balancers) - Moved interfaces from package
internal/balancer/ibalancertointernal/balancer - Added
NextResultSetErr()func for select next result set and return error - Added package
table/result/indexedwith interfacesindexed.Required,indexed.Optional,indexed.RequiredOrOptional - Replaced abstract
interface{}inScantoindexed.RequiredOrOptional - Replaced abstract
interface{}inScanWithDefaultstoindexed.Required - Replaced
trace.Table.OnPoolRetrycallback totrace.Table.OnPoolDoandtrace.Table.OnPoolDoTxcallbacks - Supports server hint
session-closefor gracefully shutdown session
- Retry remove directory in
sugar.RemoveRecursive()for retryable error
- Fixed panic on
result.Reset(nil)
- Replaced
OptiontoCustomOptiononConnectioninterface methods - Implements
WithCustom[Token,Database]options for redefine database and token - Removed experimental
balancer.PreferEndpoints[WithFallback][RegEx]balancers - Supported connections
TTLwithOptionWithConnectionTTL - Remove unnecessary
WithFastDialoption (lazy connections are always fast inserts into cluster) - Added
Scriptingservice client with API methodsExecute(),StreamExecute()andExplain() - Added
String()method totable.types.Typeinterface - Added
With[Custom]UserAgent()OptionandCustomOptionconstructors - Refactored
log.Loggerinterface and internal implementation - Added
retry.RetryableError()for returns user-defined error which must be retryed - Renamed internal type
internal.errors.OperationCompletedtointernal.errors.OperationStatus - Added
String()method totable.KeyRangeandtable.Valuetypes - Replaced creation of goroutine on each stream call to explicit call stream.Recv() on NextResultSet()
- Refactored table retry helpers
- Added new
PreferLocations[WithFallback][RegEx]balancers - Added
trace.Details.String()andtrace.Details.Strings()helpers - Added
trace.DetailsFromString(s)andtrace.DetailsFromStrings(s)helper
- Switched closing cluster after closing all sub-services
- Added windows and macOS runtimes to unit and integration tests
- Added
config/balancerpackage with popular balancers - Added new
PreferEndpoints[WithFallback][RegEx]balancers - Removed
config.BalancerConfigstruct - Refactored internal packages (tree to flat, split balancers to different packages)
- Moved a taking conn to start of
conn.Invoke/conn.NewStreamfor applying timeouts to alive conn instead lazy conn (previous logic applied timeouts to all request including dialing on lazy conn)
- Added auto-close stream result on end of stream
- Changed
Loggerinterface for support custom loggers - Added public type
LoggerOptionfor proxies to internallogger.Option - Fixed deadlock on table stream requests
- Fixed data race on closing table result
- Added custom dns-resolver to grpc options for use dns-balancing with round_robin balancing policy
- Wrapped with
recover()system panic on getting system certificates pool - Added linters and fixed issues from them
- Changed API of
sugarpackage
- Added system certificates for
darwinsystem - Fixed
table.StreamResultfinishing - Fixes
sugar.MakePath() - Added helper
ydb.MergeOptions()for merge severalydb.Optionto singleydb.Option
- Added
ClosabelSessioninterface which extendsSessioninterface and provideClosemethod - Added
CreateSessionmethod intotable.Clientinterface - Added
Contextfield intotrace.Driver.Net{Dial,Read,Write,Close}StartInfostructs - Added
Addressfield intotrace.Driver.DiscoveryStartInfostruct - Improved logger options (provide err and out writers, provide external logger)
- Renamed package
table.resultsettotable.result - Added
trace.Driver.{OnInit,OnClose}events - Changed unit/integration tests running
- Fixed/added YDB error checkers
- Dropped
ydb.WithDriverConfigOptions(duplicate ofydb.With) - Fixed freeze on closing driver
- Fixed
CGOrace onDarwinsystem when driver tried to expand tilde on certificates path - Removed
EnsurePathExistsandCleanupDatabasefrom API ofscheme.Client - Added helpers
MakePathandCleanPathto root of packageydb-go-sdk - Removed call
types.Scanner.UnmarshalYDB()insidescanner.setDefaults() - Added
DoTx()API method intotable.Client - Added
String()method intoConnectParamsfor serialize params to connection string - Added early exit from Rollback for committed transaction
- Moved
HasNextResultSet()method fromResultinterface to commonresultinterface. It provides access toHasNextResultSet()on both result interfaces (unary and stream results) - Added public credentials constructors
credentials.NewAnonymousCredentials()andcredentials.NewAccessTokenCredentials(token)
- Prefer
ydb.table.types.Scannerscanner implementation oversql.Scanner, when both available.
- Forced
round_robingrpc load balancing instead defaultpick_first - Added checker
IsTransportErrorCancelled
- Simplified
Is{Transport,Operation}Error - Added
IsYdbErrorhelper
- Fixed retry reaction on operation error NotFound (non-retryable now)
- Fixed logic bug in
trace.Table.ExecuteDataQuery{Start,Done}Info
- Cleared repeater context for discovery goroutine
- Fixed type of
trace.Details
- Added
table.options.WithPartitioningSettings
- Added
trace.DriverConnEventsconstant
- Stored node ID into
endpoint.Endpointstruct - Simplified <Host,Port> in
endpoint.Endpointto single fqdn Address - On table session requests now preferred the endpoint by
IDextracted from sessionID. If endpoint byIDnot found - using the endpoint from balancer - Upgraded internal logger for print colored messages
- Fixed compare endpoints func
- Reverted
NodeIDas key for link between session and endpoint because yandex-cloud YDB installation not supportedEndpoint.IDentity
- Dropped endpoint.Addr entity as unused. After change link type between session and endpoint to NodeID endpoint.Addr became unnecessary for internal logic of driver
- Enabled integration test table pool health
- Fixed race on session stream requests
- Returned context error when context is done on
session.StreamExecuteScanQueryandsession.StreamReadTable
- Fixed bug of interpret tilda in path of certificates file
- Added chapter to
README.mdabout ecosystem of debug tools overydb-go-sdk
- Fixed result type of
RawValue.String(ydb string compatible) - Fixed scans ydb types into string and slice byte receivers
- Upgraded dependencies
- Added
WithEndpointandWithDatabaseOption constructors
- added package
logwith interfacelog.Logger - implements
trace.Driverandtrace.Tablewithlog.Logger - added internal leveled logger which implement interface
log.Logger - supported environment variable
YDB_LOG_SEVERITY_LEVEL - changed name of the field
RetryAttemptstoAttemptsin the structuretrace.PoolGetDoneInfo. This change reduces back compatibility, but there are no external uses of v3 sdk, so this change is fine. We are sorry if this change broke your code
- published scheme Client interface
- refactored integration tests
- fixed table retry trace calls
- Refactored sources for splitting public interfaces and internal implementation for core changes in the future without change major version
- Refactored of transport level of driver - now we use grpc code generation by stock
protoc-gen-goinstead internal protoc codegen. New API provide operate from codegen grpc-clients with driver as a single grpc client connection. But driver hide inside self a pool of grpc connections to different cluster endpoints YDB. All communications with YDB (base services includes to driver: table, discovery, coordiantion and ratelimiter) provides stock codegen grpc-clients now. - Much changed API of driver for easy usage.
- Dropped package
ydbsql(moved to external project) - Extracted yandex-cloud authentication to external project
- Extracted examples to external project
- Changed of traces API for next usage in jaeger и prometheus
- Dropped old APIs marked as
deprecated - Added integration tests with docker ydb container
- Changed table session and endpoint link type from string address to integer NodeID
- Added possibility to override
x-ydb-databasemetadata value
- Fixed context cancellation inside repeater loop
- Fixed data race on cluster get/pessimize
- Dropped internal cluster connections tracker
- Switched initial connect to all endpoints after discovery to lazy connect
- Added reconnect for broken conns
- Thrown context without deadline into discovery goroutine
- Added
Addressparam toDiscoveryStartInfostruct - Forced
round_bobingrpc load balancing config instead defaultpick_first - Fixed applying driver trace from context in
connect.New - Excluded using session pool usage for create/take sessions in
database/sqldriver implementation. Packageydbsqlwithdatabase/sqldriver implementation used directCreateSessiontable client call in the best effort loop
- Fixed panic when ready conns is zero
- Initialized repeater permanently regardless of the value
DriverConfig.DiscoveryIntervalThis change allow forcing re-discovery depends on cluster state
- Returned context error when context is done on
StreamExecuteScanQuery
- Fixed
mapBadSessionError()inydbsqlpackage
- Fixed race on
ydbsqlconcurrent connect. This hotfix only for v2 version
- Added
GlobalAsyncIndeximplementation of index interface
- Replaced
<session, endpoint>link type from raw conn to plain endpoint address - Moved checking linked endpoint from
driver.{Call,StreamRead}tocluster.Get - Added pessimization endpoint code for
driver.StreamReadif transport error received - Setted transport error
Cancelledas needs to remove session from pool - Deprecated connection use policy (used auto policy)
- Fixed goroutines leak on StreamRead call
- Fixed force re-discover on receive error after 1 second
- Added timeout to context in
cluster.Getif context deadline not defined
- Renamed context idempotent operation flag
- Forced cancelled transport error as retriable (only idempotent operations)
- Renamed some internal retry mode types
- Forced grpc keep-alive PermitWithoutStream parameter to true
- Added errors without panic
- Added check nil grpc.ClientConn connection
- Processed nil connection error in keeper loop
- Added RawValue and supported ydb.Scanner in Scan
- Added NextResultSet for both streaming and non-streaming operations
- Dropped busy checker logic
- Refactoring of
RetryMode,RetryCheckerandRetryer - Added fast/slow retry logic
- Supported context param for retry operation with no idempotent errors
- Added secondary indexes info to table describing method
- fix panic on lazy put to full pool
- Exported
SessionProvider.CloseSessionfunc - Implements by default async closing session and putting busy session into pool
- Added some session pool trace funcs for execution control of goroutines in tests
- Switched internal session pool boolean field closed from atomic usage to mutex-locked usage
- Added panic on double scan per row
- Supported nil and time conventions for scanner
- Reverted adds async sessionGet and opDo into
table.Retry. - Added
sessionClose()func intoSessionProviderinterface.
- Remove ready queue from session pool
- Fix put session into pool
- Fix panic on operate with result scanner
- Fix lock on write to chan in case when context is done
- Added
ScanRawfor scan results as struct, list, tuple, map - Created
RawScannerinterface in order to generate method With
- Fixed deadlock in the session pool
- Added new scanner API.
- Fixed dualism of interpret data (default values were deprecated for optional values)
- Fixed
internal/stats/series.go(index out of range) - Optimized rotate buckets in the
Series
- Moved
api/wrap.goto root for next replacement api package to external genproto
- Correct session pool tests
- Fixed conditions with KeepAliveMinSize and
IdleKeepAliveThreshold
- Added credentials connect options:
connect.WithAccessTokenCredentials(accessToken)connect.WithAnonymousCredentials()connect.WithMetadataCredentials(ctx)connect.WithServiceAccountKeyFileCredentiials(serviceAccountKeyFile)
- Added auth examples:
example/auth/environexample/auth/access_token_credentialsexample/auth/anonymous_credentialsexample/auth/metadata_credentialsexample/auth/service_account_credentials
- Fixed returning error from
table.StreamExecuteScanQuery
- Supported loading certs from file using
YDB_SSL_ROOT_CERTIFICATES_FILEenvironment variable
- Fixed erasing session from pool if session keep-alive count great then
IdleKeepAliveThreshold - Add major session pool config params as
connect.WithSessionPool*()options
- Added panic for wrong
NextSet/NextStreamSetcall
- Fixed infinite keep alive session on transport errors
CancelledandDeadlineExceeded
- Fixed parser of connection string
- Fixed
EnsurePathExistsandCleanupDatabasemethods - Fixed
basic_example_v1 - Renamed example cli flag
-link=connectionStringto-ydb=connectionStringfor connection string to YDB - Added
-connect-timeoutflag to example cli - Fixed some linter issues
- Renamed package ydbx to connect. New usage semantic:
connect.New()insteadydbx.Connect() - Added
healthcheckexample - Fixed all examples with usage connect package
- Dropped
example/internal/ydbutilpackage - Simplified API of Traces - replace all pairs start/done to single handler with closure.
- Fixed
WithYdbCAat nil certPool case
- Fixed package name of
ydbx
- Added
ydbxpackage
- Fixed
fmt.Errorferror wrapping and some linter issues
- Added helper for create credentials from environ
- Added anonymous credentials
- Move YDB Certificate Authority from auth/iam package to root package. YDB CA need to dial with dedicated YDB and not need to dial with IAM. YDB CA automatically added to all grpc calling
- Added
Composemethod to traces
- Load YDB certificates by default with TLS connection
- Support scan-query method in
ydbsql(database/sql API)
- Use
github.com/golang-jwt/jwtinstead ofgithub.com/dgrijalva/jwt-go
- Append (if not exits) SYNC Operation mode on table calls: *Session, *DataQuery, *Transaction, KeepAlive
- Remove unused ContextDeadlineMapping driver config (always used default value)
- Simplify operation params logic
- Append (if not exits) SYNC Operation mode on ExecuteDataQuery call
- Fixed timeout and cancellation setting for YDB operations
- Introduced possibility to use
ContextDeadlineNoMappingonce again
- Negative
table.Client.MaxQueryCacheSizewill disable a client query cache now - Refactoring of
meta.gofor simple adding in the future new headers to requests - Added support
x-ydb-trace-idas standard SDK header
- Implements smart lazy createSession for best control of create/delete session balance. This feature fix leakage of forgotten sessions on server-side
- Some imporvements of session pool stats
- Fix closing sessions on PutBusy()
- Force setting operation timeout from client context timeout (if this timeout less then default operation timeout)
- Added helper
ydb.ContextWithoutDeadlinefor clearing existing context from any deadlines
- SDK versioning switched to
Semantic Versioning 2.0.0
- Added
table.TimeToLiveSettingsstruct and correspondingtable.WithTimeToLiveSettings,table.WithSetTimeToLiveandtable.WithDropTimeToLiveoptions. - Deprecated
table.TTLSettingsstruct alongside withtable.WithTTL,table.WithSetTTLandtable.WithDropTTLfunctions.
- Add Truncated flag support.
- Fixed a race between
SessionPool.PutandSessionPool.Get, where the latter would end up waiting forever for a session that is already in the pool.
- Changed semantics of
table.Result.O...methods (e.g.,OUTF8): it will not fail if current item is non-optional primitive.
- added CommitTx method, which returns QueryStats
- re-implementation of ydb.Value comparison
- fix basic examples
- increase default and minimum
Dialer.KeepAlivesetting
- added
ydbsql/connectoroptions to configure default list ofExecDataQueryOption
- tune
grpc.Connbehaviour
- function to compare two ydb.Value
- support scan query execution
- add table Ttl options
- added
KeyBloomFiltersupport forCreateTable,AlterTableandDescribeTalbe - added
PartitioningSettingssupport forCreateTable,AlterTableandDescribeTalbe. Move toPartitioningSettingsobject
- add
FastDialoption toDriverConfig. This will allowDialerto returnDriveras soon as the 1st connection is ready.
- parallelize endpoint operations
- added
ProcessCPUTimemethod toQueryStats - added
ReadReplicasSettingssupport forCreateTable,AlterTableandDescribeTalbe - added
StorageSettingssupport forCreateTable,AlterTableandDescribeTalbe
- added
PartitioningSettingssupport forCreateTableandAlterTable
- added
CPUTimeandAffectedShardsfields toQueryPhasestruct - added
CompilationStatsstatistics
- support manage table attributes
- support Column Families
- support new types: DyNumber, JsonDocument
- added coordination service
- added rate_limiter service
- made
apiwrapper forinternalapi subset
- return TableStats and PartitionStats on DescribeTable request with options
- added
ydbsql/connectoroption to configureDefaultTxControl
- support go modules tooling for ydbgen
- refactored
InstanceServiceAccount: refresh token in background. Also, will never produce error on creation - added getting
ydb.Credentialsexamples
- exported internal
api.Wrap/api.Unwrapmethods and linked structures
- return on discovery only endpoints that match SSL status of driver
- added GCP metadata auth style with
InstanceServiceAccountinauth.iam
- fix race in
auth.metadata - fix races in test hooks
- set limits to grpc
MaxCallRecvMsgSizeandMaxCallSendMsgSizeto 64MB - remove deprecated IAM (jwt)
Clientstructure - fix panic on nil dereference while accessing optional fields of
IssueMessagemessage
- added options to
DescribeTablerequest - added
ydbsql/connectoroptions to configurepoolsKeepAliveBatchSize,KeepAliveTimeout,CreateSessionTimeout,DeleteTimeout
- set session keepAlive period to 5 min - same as in other SDKs
- fix panic on access to index after pool close
- added session pre-creation limit check in pool
- added discovery trigger on more then half unhealthy transport connects
- await transport connect only if no healthy connections left
- support cloud IAM (jwt) authorization from service account file
- minimum version of Go become 1.13. Started support of new
errorsfeatures