Releases: tarantool/go-tarantool
v2.4.1
v2.4.0
This release focuses on adding schema/user/session operations, synchronous transaction flag handling, and fixes watcher panic.
Added
- Implemented all box.schema.user operations requests and sugar interface (#426).
- Implemented box.session.su request and sugar interface only for current session granting (#426).
- Defined
ErrConcurrentSchemaUpdateconstant for "concurrent schema update" error (#404).
Now you can check this error witherrors.Is(err, tarantool.ErrConcurrentSchemaUpdate). - Implemented support for
IPROTO_IS_SYNCflag in stream transactions, addedIsSync(bool)method forBeginRequest/CommitRequest(#447).
Fixed
- Fixed panic when calling NewWatcher() during reconnection or after connection is closed (#438).
v2.3.2
This release improves the logic of Connect and pool.Connect in case of a hung I/O connection.
Changed
- Previously,
pool.Connectattempted to establish a connection one after another instance. It could cause the entire chain to hang if one connection hanged. Now connections are established in parallel. After the first successful connection, the remaining connections wait with a timeout ofpool.Opts.CheckTimeout(#444).
Fixed
v2.3.1
The patch releases fixes expected Connect() behavior and reduces allocations.
Added
- A usage of sync.Pool of msgpack.Decoder saves 2 object allocations per a response decoding.
Changed
- Connect() now retry the connection if a failure occurs and opts.Reconnect > 0. The number of attempts is equal to opts.MaxReconnects or unlimited if opts.MaxReconnects == 0. Connect() blocks until a connection is established, the context is cancelled, or the number of attempts is exhausted (#436).
v2.3.0
The release extends box.info responses and ConnectionPool.GetInfo return data.
Be careful, we have changed the test_helpers package a little since we do not support backward compatibility for it.
Added
- Extend box with replication information (#427).
- The Instance info has been added to ConnectionInfo for ConnectionPool.GetInfo response (#429).
- Added helpers to run Tarantool config storage (#431).
Changed
- Changed helpers API
StartTarantoolandStopTarantool, now it uses pointer onTarantoolInstance:StartTarantool()returns*TarantoolInstance;StopTarantool()andStopTarantoolWithCleanup()accepts
*TarantoolInstanceas arguments.
- Field
CmdinTarantoolInstancestruct declared as deprecated. SuggestedWait(),Stop()andSignal()methods as safer to use instead of directCmd.Processaccess (#431).
Fixed
- Test helpers does not detect a fail to start a Tarantool instance if another Tarantool instance already listens a port (#431).
v2.2.1
v2.2.0
Overview
The release introduces the IPROTO_INSERT_ARROW request (arrow.InsertRequest) and a request to archive box.info values (box.InfoRequest). Additionally, it includes some improvements to logging.
Added
- Error logging to
ConnectionPool.Add()in case, when unable to establish connection and ctx is not canceled (#389). - Error logging for error case of
ConnectionPool.tryConnect()calls inConnectionPool.controller()andConnectionPool.reconnect()(#389). - Methods that are implemented but not included in the pooler interface (#395).
- Implemented stringer methods for pool.Role (#405).
- Support the IPROTO_INSERT_ARROW request (#399).
- A simple implementation of using the box interface (#410).
Changed
- More informative request canceling: log the probable reason for unexpected request ID and add request ID info to context done error message (#407).
v2.1.0
Overview
The small release improves the ConnectionPool. The ConnectionPool is no longer required execute access for box.info from a user for Tarantool >= 3.0.0.
Breaking changes
There are no breaking changes in the release.
New features
executeaccess forbox.infois no longer required for ConnectionPool for a Tarantool version >= 3.0.0 (#380).
Bugfixes
ConnectionPool.Remove()does not notify aConnectionHandlerafter an instance is already removed from the pool (#385).
v2.0.0
Overview
There are many changes in the new major version. The main ones:
- The
go_tarantool_call_17build tag is no longer needed, since by default theCallRequestisCall17Request. - The
go_tarantool_msgpack_v5build tag is no longer needed, since only themsgpack/v5library is used. - The
go_tarantool_ssl_disablebuild tag is no longer needed, since the connector is no longer depends onOpenSSLby default. You could use the external library go-tlsdialer to create a connection with thessltransport. - Required Go version is
1.20now. - The
Connectfunction became more flexible. It now allows to create a connection with cancellation and a customDialerimplementation. - It is required to use
Requestimplementation types with theConnection.Domethod instead ofConnection.<Request>methods. - The
connection_poolpackage renamed topool.
See the migration guide for more details.
Breaking changes
- connection_pool renamed to pool (#239).
- Use msgpack/v5 instead of msgpack.v2 (#236).
- Call/NewCallRequest = Call17/NewCall17Request (#235).
- Change encoding of the queue.Identify() UUID argument from binary blob to plain string. Needed for upgrade to Tarantool 3.0, where a binary blob is decoded to a varbinary object (#313).
- Use objects of the Decimal type instead of pointers (#238).
- Use objects of the Datetime type instead of pointers (#238).
connection.Connectno longer return non-working connection objects (#136). This function now does not attempt to reconnect and tries to establish a connection only once. Function might be canceled via context. Context accepted as first argument.pool.Connectandpool.Addnow accept context as the first argument, which user may cancel in process. Ifpool.Connectis canceled in progress, an error will be returned. All created connections will be closed.iproto.Featuretype now used instead ofProtocolFeature(#337).iproto.IPROTO_FEATURE_constants now used instead of localFeatureconstants forprotocol(#337).- Change
crudoperationsTimeoutoption type tocrud.OptFloat64instead ofcrud.OptUint(#342). - Change all
UpsertandUpdaterequests to accept*tarantool.Operationsasopsparameters instead ofinterface{}(#348). - Change
OverrideSchema(*Schema)toSetSchema(Schema)(#7). - Change values, stored by pointers in the
Schema,Space,Indexstructs, to be stored by their values (#7). - Make
Dialermandatory for creation a single connection (#321). - Remove
Connection.RemoteAddr(),Connection.LocalAddr(). AddAddr()function instead (#321). - Remove
Connection.ClientProtocolInfo,Connection.ServerProtocolInfo. AddProtocolInfo()function instead, which returns the server protocol info (#321). NewWatcherchecks the actual features of the server, rather than relying on the features provided by the user during connection creation (#321).pool.NewWatcherdoes not create watchers for connections that do not support it (#321).- Rename
pool.GetPoolInfotopool.GetInfo. Change return type tomap[string]ConnectionInfo(#321). Responseis now an interface (#237).- All responses are now implementations of the
Responseinterface (#237).SelectResponse,ExecuteResponse,PrepareResponse,PushResponseare part of a public API.Pos(),MetaData(),SQLInfo()methods created for them to get specific info. Special types of responses are used with special requests. IsPush()method is added to the response iterator (#237). It returns the information if the current response is aPushResponse.PushCodeconstant is removed.- Method
GetforFuturenow returns response data (#237). To get the actual response newGetResponsemethod has been added. MethodsAppendPushandSetResponseaccept responseHeaderand data as their arguments. Futureconstructors now acceptRequestas their argument (#237).- Operations
Ping,Select,Insert,Replace,Delete,Update,Upsert,Call,Call16,Call17,Eval,Executeof aConnectorandPoolerreturn response data instead of an actual responses (#237). pool.Connect,pool.ConnetcWithOptsandpool.Adduse a new typepool.Instanceto determinate connection options (#356).pool.Connect,pool.ConnectWithOptsandpool.Addadd connections to the pool even it is unable to connect to it (#372).- Required Go version from
1.13to1.20(#378). - multi subpackage is removed (#240).
- msgpack.v2 support is removed (#236).
- pool/RoundRobinStrategy is removed (#158).
- DeadlineIO is removed (#158).
- UUID_extId is removed (#158).
- IPROTO constants are removed (#158).
- Code() method from the Request interface is removed (#158).
Schemafield from theConnectionstruct is removed (#7).OkCodeandPushCodeconstants are removed (#237).- SSL support is removed (#301).
Future.Err()method is removed (#382).
New features
- Type() method to the Request interface (#158).
- Enumeration types for RLimitAction/iterators (#158).
- IsNullable flag for Field (#302).
- Meaningful description for read/write socket errors (#129).
- Support
operation_dataincrud.Error(#330). - Support
fetch_latest_metadataoption for crud requests with metadata (#335). - Support
noreturnoption for data change crud requests (#335). - Support
crud.schemarequest (#336, #351). - Support
IPROTO_WATCH_ONCErequest type for Tarantool version >= 3.0.0-alpha1 (#337). - Support
yield_everyoption for crud select requests (#350). - Support
IPROTO_FEATURE_SPACE_AND_INDEX_NAMESfor Tarantool version >= 3.0.0-alpha1 (#338). It allows to use space and index names in requests instead of their IDs. GetSchemafunction to get the actual schema (#7).- Support connection via an existing socket fd (#321).
Headerstruct for the response header (#237). It can be accessed viaHeader()method of theResponseinterface.Responsemethod added to theRequestinterface (#237).- New
LogAppendPushFailedconnection log constant (#237). It is logged when connection fails to append a push response. ErrorNoconstant that indicates that no error has occurred while getting the response (#237).AuthDialertype for creating a dialer with authentication (#301).ProtocolDialertype for creating a dialer withProtocolInforeceiving and check (#301).GreetingDialertype for creating a dialer, that fillsGreetingof a connection (#301).- New method
Pool.DoInstanceto execute a request on a target instance in a pool (#376).