Release v3.0.0#593
Merged
Merged
Conversation
b895490 to
9c7d71b
Compare
bigbes
approved these changes
Jun 8, 2026
9c7d71b to
5220638
Compare
bigbes
approved these changes
Jun 8, 2026
patapenka-alexey
approved these changes
Jun 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v3 redesigns the connector for a simpler, more idiomatic Go experience.
Logging plugs into
*slog.Logger— no custom interface.Error handling now works the way Go expects:
errors.Isanderrors.Asjust work — writeif errors.Is(err, tarantool.ErrTimeouted)instead of comparing numeric codes. Context cancellation errors carryctx.Cause(), so the underlying reason is always inspectable.Request builders return immutable values, safe to share across goroutines without defensive copying.
For high-throughput workloads, the new
Allocatorinterface andFuture.Release()give you explicit control over buffer reuse — push allocations out of the hot path.FutureandStreambecame opaque interfaces, hiding internals and giving us freedom to evolve them.Requires Go 1.24. See MIGRATION.md for upgrade details.
Added
box.MustNewwrapper forbox.Newwithout an error (v3: box.New should return an error instead of panic #448).Futureinterface (v3: proposal re make tarantool.Future to be interface type #470).ReleaseforFutureandResponseinterface that allows to free used data directly by calling (v3: design API to avoid allocations in responses #493).Futureobject created by theConnectiontype could be released with theFuture.Release()call (v3: design API to avoid allocations in responses #493).Allocatorinterface for custom allocation of response buffers (v3: design API to avoid allocations in responses #493).PoolAllocatortype that implementsAllocatorusing sync.Pool for power-of-two sized byte slices (v3: design API to avoid allocations in responses #493).Opts.Allocatoroption to configure a custom allocator for a connection (v3: design API to avoid allocations in responses #493).Tinterface compatible with testing.T methods to make testing easier,test_helpersupdated with it (v3: use interface instead of*testing.Tintest_helpers#474).MockDoerinterface for customDoertesting with builder pattern methods:AddResponse,AddResponseRaw,AddResponseError,Requests(v3: refactor request/response mocking to use a unified MockDoer API #487).MockRequestNamedtype for verifying specific requests in tests (tests: MockDoer refactoring #574).test_helpers.ExecuteOnAllfunction to execute operations on all instances in parallel with context support (v3: multiple improvements on test_helpers package [pool_helper.go] #485).(*test_helpers.TarantoolInstance).LogTail()method that returns the last 50 lines of captured tarantool stdout/stderr (tests: capture tarantool log tail in startup errors #587).test_helpers.DumpLogsIfFailed(t, inst)helper that prints the captured tarantool log viat.Logfwhen the test failed — intended fordefer test_helpers.DumpLogsIfFailed(t, inst)after a successfulStartTarantool(tests: capture tarantool log tail in startup errors #587).Changed
New*Request()constructors now return values instead of pointers. All methods on request types use value receivers and return values, enabling immutable builder-style chaining (request: switch all request types to value receivers and value returns #584).Make*toNew*for naming consistency across the connector (request: switch all request types to value receivers and value returns #584). Affectscrud.Make*Request(nowcrud.New*Request),datetime.MakeDatetime(nowdatetime.NewDatetime),decimal.MakeDecimalanddecimal.MakeDecimalFromString(nowdecimal.NewDecimalanddecimal.NewDecimalFromString),decimal.MustMakeDecimal(nowdecimal.MustNewDecimal),arrow.MakeArrow(nowarrow.NewArrow), andcrud.MakeResult(nowcrud.NewResult).spaceRequest,spaceIndexRequesttypes —spaceandindexfields are now inlined directly into each request struct. The same flattening was applied tocrud.spaceRequest(request: switch all request types to value receivers and value returns #584).1.24now (package: update go and package versions #456).errors.Is/errors.As(v3: new design for go-tarantool errors #469):tarantool.Errorrenamed totarantool.ServerError; the seven legacy client error code constants are now package-levelerrorsentinels (ErrConnectionClosed,ErrTimeouted, ...) with numeric forms exposed astarantool.Code*;ClientErrorgained aCausefield that wraps the underlying I/O error;ClientError.Temporary()removed in favour oftarantool.IsRetryableError(err)/errors.Is(err, ErrRetryable). See MIGRATION.md.test_helpers.MockDoeris now an interface instead of a struct (v3: refactor request/response mocking to use a unified MockDoer API #487). TheRequestsfield became a methodRequests(). TheNewMockDoer()constructor now returns the interface and uses a builder pattern. OldNewMockDoer(t, ...interface{})is removed. UseNewMockDoer(t), then chainAddResponseRaw(),AddResponseError(),AddResponse()to configure responses.box.Newreturns an error instead of panic (v3: box.New should return an error instead of panic #448).<-ctx.Done()returns wrapped error provided byctx.Cause(). Allows you compare it usingerrors.Is/As(v3: return context error after it is done #457).poolmethods, related interfaces and tests are updated (v3: remove all deprecated pooler methods and their implementations #478).box.session.push()support: Future.AppendPush() and Future.GetIterator() methods, ResponseIterator and TimeoutResponseIterator types, Future.pushes[], Future.ready (v3: remove all deprecated methods re obsolete push API #480, v3: remove Future.ready usage #497).LogAppendPushFailedreplaced withLogBoxSessionPushUnsupported(v3: remove all deprecated methods re obsolete push API #480).Connectionmethods, related interfaces and tests are updated (v3: remove all deprecated connection methods and their implementations #479).Futuretransform intofuturethat implements interfaceFutureand become private,SetErrorandSetResponsebecome private (v3: proposal re make tarantool.Future to be interface type #470).ConnectionPool.Close()returns a single error value, combining multiple errors using errors.Join() (v3: refactor ConnectionPool.Close() to return a single error #540).test_helpers.CheckPoolStatusesandtest_helpers.ProcessListenOnInstancenow accept typed arguments (CheckStatusesArgsandListenOnInstanceArgsrespectively) instead ofinterface{}(v3: multiple improvements on test_helpers package [pool_helper.go] #485).ConnectionPool.ConnectWithOpts(),ConnectionPool.Connect()andConnectionPool.Add()now return an error iftarantool.Opts.Reconnect,tarantool.Opts.MaxReconnectsortarantool.Opts.Notifyoptions are set for an instance connection (pool: ban Reconnect, MaxReconnects and Notify opts #581). These options conflict with the pool's own reconnection logic and produce misleading events. Usepool.ConnectionHandlerto track connection availability instead oftarantool.Opts.Notify. All validation errors are combined usingerrors.Joinand can be checked witherrors.Is.pool.ConnectionPooltopool.Pool,pool.ConnectionHandlertopool.Handler,pool.ConnectionInfotopool.Info,pool.ConnectionInfo.ConnRoletopool.Info.Role(api: rename pool package public API for Go idiomatic naming #580).pool.Pool.GetInfo()topool.Pool.Info()(api: rename pool package public API for Go idiomatic naming #580).pool.Pool.DoInstance()topool.Pool.DoOn()(api: rename pool package public API for Go idiomatic naming #580).pool.Connect()topool.New(),pool.ConnectWithOpts()topool.NewWithOpts()(api: rename pool package public API for Go idiomatic naming #580).poolenum constants to use prefix:ANY→ModeAny,RW→ModeRW,RO→ModeRO,PreferRW→ModePreferRW,PreferRO→ModePreferRO,UnknownRole→RoleUnknown,MasterRole→RoleMaster,ReplicaRole→RoleReplica(api: rename pool package public API for Go idiomatic naming #580).Loggerinterface with*slog.Loggerfrom the standard library (v3: change design of tarantool.Logger #504). TheLoggerinterface,ConnLogKindtype, and its constants (LogReconnectFailed,LogLastReconnectFailed,LogUnexpectedResultId,LogWatchEventReadFailed,LogBoxSessionPushUnsupported) are removed. UseOpts.Logger *slog.Loggerinstead. PoolOpts.Logger *slog.Loggerreplaces directlog.Printfcalls that were not customizable. By default, logs arediscarded (silent). See MIGRATION.md for details.
Streamstruct fieldsIdandConnare now unexported, makingStreaman opaque handle. Neither the stream identifier nor the underlying connection is reachable from outside the package (v3: refactorStreamstruct #471).Removed
NewCall16RequestandNewCall17Requestconstructors. UseNewCallRequestinstead (api: remove deprecated Call16/Call17 constructors #579).test_helpers.Retryfunction. Useassert.Eventuallyfrom testify instead.test_helpers.WaitUntilReconnectedreimplemented withoutRetry(v3: multiple improvements on test_helpers package [pool_helper.go] #485).Loggerinterface anddefaultLoggertype — replaced by*slog.Logger(v3: change design of tarantool.Logger #504).ConnLogKindtype and its constants — log messages are now identified by string constants inlog.go(v3: change design of tarantool.Logger #504).Fixed
test_helpers.StartTarantoolare now terminated when the parent test process dies, preventing leaked instances after a panic (tests: prevent leaked tarantool and panic on bad start #586).test_helpers.StartTarantoolnow captures the last lines of the spawned tarantool's stdout/stderr and includes them in the returned error when startup fails, so test failures show the underlying tarantool error directly instead of just "exit status 1" or a connection timeout (tests: capture tarantool log tail in startup errors #587).test_helpers.StopTarantoolWithCleanuponly after assertingStartTarantooldid not return an error, so a failed start no longer panics with a nil-pointer dereference in the deferred cleanup (tests: prevent leaked tarantool and panic on bad start #586).