@@ -10,6 +10,33 @@ Versioning](http://semver.org/spec/v2.0.0.html) except to the first release.
1010
1111### Added
1212
13+ ### Changed
14+
15+ ### Fixed
16+
17+ ## [ v3.0.0] - 2026-06-08
18+
19+ v3 redesigns the connector for a simpler, more idiomatic Go experience.
20+
21+ Logging plugs into ` *slog.Logger ` — no custom interface.
22+
23+ Error handling now works the way Go expects: ` errors.Is ` and ` errors.As `
24+ just work — write ` if errors.Is(err, tarantool.ErrTimeouted) ` instead of
25+ comparing numeric codes. Context cancellation errors carry ` ctx.Cause() ` ,
26+ so the underlying reason is always inspectable.
27+
28+ Request builders return immutable values, safe to share across goroutines
29+ without defensive copying.
30+
31+ For high-throughput workloads, the new ` Allocator ` interface and
32+ ` Future.Release() ` give you explicit control over buffer reuse — push
33+ allocations out of the hot path. ` Future ` and ` Stream ` became opaque
34+ interfaces, hiding internals and giving us freedom to evolve them.
35+
36+ Requires Go 1.24. See [ MIGRATION.md] ( ./MIGRATION.md ) for upgrade details.
37+
38+ ### Added
39+
1340* New types for MessagePack extensions compatible with go-option (#459 ).
1441* Added ` box.MustNew ` wrapper for ` box.New ` without an error (#448 ).
1542* Added missing IPROTO feature flags to greeting negotiation
@@ -18,46 +45,47 @@ Versioning](http://semver.org/spec/v2.0.0.html) except to the first release.
1845 marks Future as done (#496 ).
1946* Added function String() for type datetime (#322 ).
2047* New ` Future ` interface (#470 ).
21- * Method ` Release ` for ` Future ` and ` Response ` interface that allows
22- to free used data directly by calling (#493 ).
48+ * Method ` Release ` for ` Future ` and ` Response ` interface that allows to free
49+ used data directly by calling (#493 ).
2350* Resources allocated for a ` Future ` object created by the ` Connection ` type
24- could be released with the ` Future.Release() ` call.
51+ could be released with the ` Future.Release() ` call ( # 493 ) .
2552* Added function String() for type interval (#322 ).
2653* New ` Allocator ` interface for custom allocation of response buffers (#493 ).
2754* New ` PoolAllocator ` type that implements ` Allocator ` using sync.Pool for
2855 power-of-two sized byte slices (#493 ).
29- * New ` Opts.Allocator ` option to configure a custom allocator for a
30- connection (#493 ).
56+ * New ` Opts.Allocator ` option to configure a custom allocator for a connection
57+ (#493 ).
3158* Method String() for type decimal.Decimal (#322 ).
32- * New ` T ` interface compatible with testing.T methods
33- to make testing easier, ` test_helpers ` updated with it (#474 ).
59+ * New ` T ` interface compatible with testing.T methods to make testing easier,
60+ ` test_helpers ` updated with it (#474 ).
3461* New ` MockDoer ` interface for custom ` Doer ` testing with builder pattern
35- methods: ` AddResponse ` , ` AddResponseRaw ` , ` AddResponseError ` , ` Requests ` .
36- * New ` MockRequestNamed ` type for verifying specific requests in tests.
62+ methods: ` AddResponse ` , ` AddResponseRaw ` , ` AddResponseError ` , ` Requests `
63+ (#487 ).
64+ * New ` MockRequestNamed ` type for verifying specific requests in tests (#574 ).
3765* New ` test_helpers.ExecuteOnAll ` function to execute operations on all
38- instances in parallel with context support.
39- * New ` (*test_helpers.TarantoolInstance).LogTail() ` method that returns
40- the last 50 lines of captured tarantool stdout/stderr (#147 ).
41- * New ` test_helpers.DumpLogsIfFailed(t, inst) ` helper that prints the
42- captured tarantool log via ` t.Logf ` when the test failed — intended
43- for ` defer test_helpers.DumpLogsIfFailed(t, inst)` after a successful
44- ` StartTarantool ` ( # 147 ).
66+ instances in parallel with context support ( # 485 ) .
67+ * New ` (*test_helpers.TarantoolInstance).LogTail() ` method that returns the
68+ last 50 lines of captured tarantool stdout/stderr (#587 ).
69+ * New ` test_helpers.DumpLogsIfFailed(t, inst) ` helper that prints the captured
70+ tarantool log via ` t.Logf ` when the test failed — intended for `defer
71+ test_helpers.DumpLogsIfFailed(t, inst)` after a successful ` StartTarantool`
72+ ( # 587 ).
4573
4674### Changed
4775
4876* All top-level ` New*Request() ` constructors now return values instead of
49- pointers. All methods on request types use value receivers and return
50- values, enabling immutable builder-style chaining.
77+ pointers. All methods on request types use value receivers and return values,
78+ enabling immutable builder-style chaining ( # 584 ) .
5179* Renamed value constructors ` Make* ` to ` New* ` for naming consistency across
52- the connector. Affects ` crud.Make*Request ` (now ` crud.New*Request ` ),
80+ the connector ( # 584 ) . Affects ` crud.Make*Request ` (now ` crud.New*Request ` ),
5381 ` datetime.MakeDatetime ` (now ` datetime.NewDatetime ` ), ` decimal.MakeDecimal `
5482 and ` decimal.MakeDecimalFromString ` (now ` decimal.NewDecimal ` and
5583 ` decimal.NewDecimalFromString ` ), ` decimal.MustMakeDecimal ` (now
5684 ` decimal.MustNewDecimal ` ), ` arrow.MakeArrow ` (now ` arrow.NewArrow ` ), and
5785 ` crud.MakeResult ` (now ` crud.NewResult ` ).
58- * Removed intermediate ` spaceRequest ` , ` spaceIndexRequest ` types — ` space `
59- and ` index ` fields are now inlined directly into each request struct.
60- The same flattening was applied to ` crud.spaceRequest ` .
86+ * Removed intermediate ` spaceRequest ` , ` spaceIndexRequest ` types — ` space ` and
87+ ` index ` fields are now inlined directly into each request struct. The same
88+ flattening was applied to ` crud.spaceRequest ` ( # 584 ) .
6189* Required Go version is ` 1.24 ` now (#456 ).
6290* Error types redesigned around ` errors.Is ` / ` errors.As ` (#469 ):
6391 ` tarantool.Error ` renamed to ` tarantool.ServerError ` ; the seven legacy
@@ -67,90 +95,88 @@ Versioning](http://semver.org/spec/v2.0.0.html) except to the first release.
6795 the underlying I/O error; ` ClientError.Temporary() ` removed in favour
6896 of ` tarantool.IsRetryableError(err) ` / ` errors.Is(err, ErrRetryable) ` .
6997 See MIGRATION.md.
70- * ` test_helpers.MockDoer ` is now an interface instead of a struct. The
98+ * ` test_helpers.MockDoer ` is now an interface instead of a struct ( # 487 ) . The
7199 ` Requests ` field became a method ` Requests() ` . The ` NewMockDoer() `
72- constructor now returns the interface and uses a builder pattern.
73- Old ` NewMockDoer(t, ...interface{}) ` is removed. Use ` NewMockDoer(t) ` ,
74- then chain ` AddResponseRaw() ` , ` AddResponseError() ` , ` AddResponse() `
75- to configure responses.
100+ constructor now returns the interface and uses a builder pattern. Old
101+ ` NewMockDoer(t, ...interface{}) ` is removed. Use ` NewMockDoer(t) ` , then chain
102+ ` AddResponseRaw() ` , ` AddResponseError() ` , ` AddResponse() ` to configure
103+ responses.
76104* ` box.New ` returns an error instead of panic (#448 ).
77105* Now cases of ` <-ctx.Done() ` returns wrapped error provided by ` ctx.Cause() ` .
78106 Allows you compare it using ` errors.Is/As ` (#457 ).
79- * Removed deprecated ` pool ` methods, related interfaces and tests are
80- updated (#478 ).
81- * Removed deprecated ` box.session.push() ` support: Future.AppendPush()
82- and Future.GetIterator() methods, ResponseIterator and
83- TimeoutResponseIterator types, Future.pushes[ ] , Future.ready (#480 , #497 ).
107+ * Removed deprecated ` pool ` methods, related interfaces and tests are updated
108+ (#478 ).
109+ * Removed deprecated ` box.session.push() ` support: Future.AppendPush() and
110+ Future.GetIterator() methods, ResponseIterator and TimeoutResponseIterator
111+ types, Future.pushes[ ] , Future.ready (#480 , #497 ).
84112* ` LogAppendPushFailed ` replaced with ` LogBoxSessionPushUnsupported ` (#480 ).
85113* Removed deprecated ` Connection ` methods, related interfaces and tests are
86114 updated (#479 ).
87115* Replaced the use of optional types in crud with go-option library (#492 ).
88- * Future.done replaced with Future.cond (sync.Cond) + Future.finished
89- bool (#496 ).
116+ * Future.done replaced with Future.cond (sync.Cond) + Future.finished bool
117+ (#496 ).
90118* ` Future ` transform into ` future ` that implements interface ` Future ` and
91119 become private, ` SetError ` and ` SetResponse ` become private (#470 ).
92120* ` ConnectionPool.Close() ` returns a single error value, combining multiple
93121 errors using errors.Join() (#540 ).
94122* ` test_helpers.CheckPoolStatuses ` and ` test_helpers.ProcessListenOnInstance `
95123 now accept typed arguments (` CheckStatusesArgs ` and ` ListenOnInstanceArgs `
96- respectively) instead of ` interface{} ` .
124+ respectively) instead of ` interface{} ` ( # 485 ) .
97125* ` ConnectionPool.ConnectWithOpts() ` , ` ConnectionPool.Connect() ` and
98126 ` ConnectionPool.Add() ` now return an error if ` tarantool.Opts.Reconnect ` ,
99- ` tarantool.Opts.MaxReconnects ` or ` tarantool.Opts.Notify ` options are set
100- for an instance connection. These options conflict with the pool's own
127+ ` tarantool.Opts.MaxReconnects ` or ` tarantool.Opts.Notify ` options are set for
128+ an instance connection ( # 581 ) . These options conflict with the pool's own
101129 reconnection logic and produce misleading events. Use
102130 ` pool.ConnectionHandler ` to track connection availability instead of
103131 ` tarantool.Opts.Notify ` . All validation errors are combined using
104132 ` errors.Join ` and can be checked with ` errors.Is ` .
105133* Rename ` pool.ConnectionPool ` to ` pool.Pool ` , ` pool.ConnectionHandler ` to
106- ` pool.Handler ` , ` pool.ConnectionInfo ` to ` pool.Info ` , ` pool.ConnectionInfo.ConnRole `
107- to ` pool.Info.Role ` .
108- * Rename ` pool.Pool.GetInfo() ` to ` pool.Pool.Info() ` .
109- * Rename ` pool.Pool.DoInstance() ` to ` pool.Pool.DoOn() ` .
134+ ` pool.Handler ` , ` pool.ConnectionInfo ` to ` pool.Info ` ,
135+ ` pool.ConnectionInfo.ConnRole ` to ` pool.Info.Role ` ( # 580 ) .
136+ * Rename ` pool.Pool.GetInfo() ` to ` pool.Pool.Info() ` ( # 580 ) .
137+ * Rename ` pool.Pool.DoInstance() ` to ` pool.Pool.DoOn() ` ( # 580 ) .
110138* Rename ` pool.Connect() ` to ` pool.New() ` , ` pool.ConnectWithOpts() ` to
111- ` pool.NewWithOpts() ` .
139+ ` pool.NewWithOpts() ` ( # 580 ) .
112140* Rename ` pool ` enum constants to use prefix: ` ANY ` → ` ModeAny ` , ` RW ` →
113141 ` ModeRW ` , ` RO ` → ` ModeRO ` , ` PreferRW ` → ` ModePreferRW ` , ` PreferRO ` →
114142 ` ModePreferRO ` , ` UnknownRole ` → ` RoleUnknown ` , ` MasterRole ` → ` RoleMaster ` ,
115- ` ReplicaRole ` → ` RoleReplica ` .
143+ ` ReplicaRole ` → ` RoleReplica ` ( # 580 ) .
116144* Replaced custom ` Logger ` interface with ` *slog.Logger ` from the standard
117145 library (#504 ). The ` Logger ` interface, ` ConnLogKind ` type, and its constants
118146 (` LogReconnectFailed ` , ` LogLastReconnectFailed ` , ` LogUnexpectedResultId ` ,
119- ` LogWatchEventReadFailed ` , ` LogBoxSessionPushUnsupported ` ) are removed.
120- Use ` Opts.Logger *slog.Logger ` instead. Pool ` Opts.Logger *slog.Logger `
121- replaces direct ` log.Printf ` calls that were not customizable.
122- By default, logs are discarded (silent). See MIGRATION.md for details.
123- * ` Stream ` struct fields ` Id ` and ` Conn ` are now unexported, making ` Stream `
124- an opaque handle. Neither the stream identifier nor the underlying
125- connection is reachable from outside the package (#471 ).
147+ ` LogWatchEventReadFailed ` , ` LogBoxSessionPushUnsupported ` ) are removed. Use
148+ ` Opts.Logger *slog.Logger ` instead. Pool ` Opts.Logger *slog.Logger ` replaces
149+ direct ` log.Printf ` calls that were not customizable. By default, logs are
150+ discarded (silent). See MIGRATION.md for details.
151+ * ` Stream ` struct fields ` Id ` and ` Conn ` are now unexported, making ` Stream ` an
152+ opaque handle. Neither the stream identifier nor the underlying connection is
153+ reachable from outside the package (#471 ).
126154
127155### Removed
128156
129157* Deprecated ` NewCall16Request ` and ` NewCall17Request ` constructors. Use
130- ` NewCallRequest ` instead.
158+ ` NewCallRequest ` instead ( # 579 ) .
131159* ` test_helpers.Retry ` function. Use ` assert.Eventually ` from testify instead.
132- ` test_helpers.WaitUntilReconnected ` reimplemented without ` Retry ` .
133- * ` Logger ` interface and ` defaultLogger ` type — replaced by
134- ` *slog.Logger ` (#504 ).
135- * ` ConnLogKind ` type and its constants — log messages are now identified
136- by string constants in ` log.go ` (#504 ).
160+ ` test_helpers.WaitUntilReconnected ` reimplemented without ` Retry ` ( # 485 ) .
161+ * ` Logger ` interface and ` defaultLogger ` type — replaced by ` *slog.Logger `
162+ (#504 ).
163+ * ` ConnLogKind ` type and its constants — log messages are now identified by
164+ string constants in ` log.go ` (#504 ).
137165
138166### Fixed
139167
140168* Fixed the fluctuating behavior of the TestConnectionHandlerOpenUpdateClose
141169 test by increasing the waiting time (#502 ).
142- * On Linux, tarantool processes started by ` test_helpers.StartTarantool `
143- are now terminated when the parent test process dies, preventing leaked
144- instances after a panic (#147 ).
145- * ` test_helpers.StartTarantool ` now captures the last lines of the
146- spawned tarantool's stdout/stderr and includes them in the returned
147- error when startup fails, so test failures show the underlying
148- tarantool error directly instead of just "exit status 1" or a
149- connection timeout (#147 ).
150- * Reordered tests to defer ` test_helpers.StopTarantoolWithCleanup ` only
151- after asserting ` StartTarantool ` did not return an error, so a failed
152- start no longer panics with a nil-pointer dereference in the deferred
153- cleanup (#147 ).
170+ * On Linux, tarantool processes started by ` test_helpers.StartTarantool ` are
171+ now terminated when the parent test process dies, preventing leaked instances
172+ after a panic (#586 ).
173+ * ` test_helpers.StartTarantool ` now captures the last lines of the spawned
174+ tarantool's stdout/stderr and includes them in the returned error when
175+ startup fails, so test failures show the underlying tarantool error directly
176+ instead of just "exit status 1" or a connection timeout (#587 ).
177+ * Reordered tests to defer ` test_helpers.StopTarantoolWithCleanup ` only after
178+ asserting ` StartTarantool ` did not return an error, so a failed start no
179+ longer panics with a nil-pointer dereference in the deferred cleanup (#586 ).
154180
155181## [ v2.4.1] - 2025-10-16
156182
0 commit comments