Skip to content

Commit 9c7d71b

Browse files
committed
Release v3.0.0
1 parent efa1725 commit 9c7d71b

3 files changed

Lines changed: 564 additions & 273 deletions

File tree

CHANGELOG.md

Lines changed: 87 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,26 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic
77
Versioning](http://semver.org/spec/v2.0.0.html) except to the first release.
88

9-
## [Unreleased]
9+
## [v3.0.0] - 2026-06-08
10+
11+
v3 redesigns the connector for a simpler, more idiomatic Go experience.
12+
13+
Logging plugs into `*slog.Logger` — no custom interface.
14+
15+
Error handling now works the way Go expects: `errors.Is` and `errors.As`
16+
just work — write `if errors.Is(err, tarantool.ErrTimeouted)` instead of
17+
comparing numeric codes. Context cancellation errors carry `ctx.Cause()`,
18+
so the underlying reason is always inspectable.
19+
20+
Request builders return immutable values, safe to share across goroutines
21+
without defensive copying.
22+
23+
For high-throughput workloads, the new `Allocator` interface and
24+
`Future.Release()` give you explicit control over buffer reuse — push
25+
allocations out of the hot path. `Future` and `Stream` became opaque
26+
interfaces, hiding internals and giving us freedom to evolve them.
27+
28+
Requires Go 1.24. See [MIGRATION.md](./MIGRATION.md) for upgrade details.
1029

1130
### Added
1231

@@ -18,46 +37,47 @@ Versioning](http://semver.org/spec/v2.0.0.html) except to the first release.
1837
marks Future as done (#496).
1938
* Added function String() for type datetime (#322).
2039
* New `Future` interface (#470).
21-
* Method `Release` for `Future` and `Response` interface that allows
22-
to free used data directly by calling (#493).
40+
* Method `Release` for `Future` and `Response` interface that allows to free
41+
used data directly by calling (#493).
2342
* Resources allocated for a `Future` object created by the `Connection` type
24-
could be released with the `Future.Release()` call.
43+
could be released with the `Future.Release()` call (#493).
2544
* Added function String() for type interval (#322).
2645
* New `Allocator` interface for custom allocation of response buffers (#493).
2746
* New `PoolAllocator` type that implements `Allocator` using sync.Pool for
2847
power-of-two sized byte slices (#493).
29-
* New `Opts.Allocator` option to configure a custom allocator for a
30-
connection (#493).
48+
* New `Opts.Allocator` option to configure a custom allocator for a connection
49+
(#493).
3150
* 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).
51+
* New `T` interface compatible with testing.T methods to make testing easier,
52+
`test_helpers` updated with it (#474).
3453
* 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.
54+
methods: `AddResponse`, `AddResponseRaw`, `AddResponseError`, `Requests`
55+
(#487).
56+
* New `MockRequestNamed` type for verifying specific requests in tests (#574).
3757
* 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).
58+
instances in parallel with context support (#485).
59+
* New `(*test_helpers.TarantoolInstance).LogTail()` method that returns the
60+
last 50 lines of captured tarantool stdout/stderr (#587).
61+
* New `test_helpers.DumpLogsIfFailed(t, inst)` helper that prints the captured
62+
tarantool log via `t.Logf` when the test failed — intended for `defer
63+
test_helpers.DumpLogsIfFailed(t, inst)` after a successful `StartTarantool`
64+
(#587).
4565

4666
### Changed
4767

4868
* 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.
69+
pointers. All methods on request types use value receivers and return values,
70+
enabling immutable builder-style chaining (#584).
5171
* Renamed value constructors `Make*` to `New*` for naming consistency across
52-
the connector. Affects `crud.Make*Request` (now `crud.New*Request`),
72+
the connector (#584). Affects `crud.Make*Request` (now `crud.New*Request`),
5373
`datetime.MakeDatetime` (now `datetime.NewDatetime`), `decimal.MakeDecimal`
5474
and `decimal.MakeDecimalFromString` (now `decimal.NewDecimal` and
5575
`decimal.NewDecimalFromString`), `decimal.MustMakeDecimal` (now
5676
`decimal.MustNewDecimal`), `arrow.MakeArrow` (now `arrow.NewArrow`), and
5777
`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`.
78+
* Removed intermediate `spaceRequest`, `spaceIndexRequest` types — `space` and
79+
`index` fields are now inlined directly into each request struct. The same
80+
flattening was applied to `crud.spaceRequest` (#584).
6181
* Required Go version is `1.24` now (#456).
6282
* Error types redesigned around `errors.Is` / `errors.As` (#469):
6383
`tarantool.Error` renamed to `tarantool.ServerError`; the seven legacy
@@ -67,90 +87,88 @@ Versioning](http://semver.org/spec/v2.0.0.html) except to the first release.
6787
the underlying I/O error; `ClientError.Temporary()` removed in favour
6888
of `tarantool.IsRetryableError(err)` / `errors.Is(err, ErrRetryable)`.
6989
See MIGRATION.md.
70-
* `test_helpers.MockDoer` is now an interface instead of a struct. The
90+
* `test_helpers.MockDoer` is now an interface instead of a struct (#487). The
7191
`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.
92+
constructor now returns the interface and uses a builder pattern. Old
93+
`NewMockDoer(t, ...interface{})` is removed. Use `NewMockDoer(t)`, then chain
94+
`AddResponseRaw()`, `AddResponseError()`, `AddResponse()` to configure
95+
responses.
7696
* `box.New` returns an error instead of panic (#448).
7797
* Now cases of `<-ctx.Done()` returns wrapped error provided by `ctx.Cause()`.
7898
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).
99+
* Removed deprecated `pool` methods, related interfaces and tests are updated
100+
(#478).
101+
* Removed deprecated `box.session.push()` support: Future.AppendPush() and
102+
Future.GetIterator() methods, ResponseIterator and TimeoutResponseIterator
103+
types, Future.pushes[], Future.ready (#480, #497).
84104
* `LogAppendPushFailed` replaced with `LogBoxSessionPushUnsupported` (#480).
85105
* Removed deprecated `Connection` methods, related interfaces and tests are
86106
updated (#479).
87107
* 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).
108+
* Future.done replaced with Future.cond (sync.Cond) + Future.finished bool
109+
(#496).
90110
* `Future` transform into `future` that implements interface `Future` and
91111
become private, `SetError` and `SetResponse` become private (#470).
92112
* `ConnectionPool.Close()` returns a single error value, combining multiple
93113
errors using errors.Join() (#540).
94114
* `test_helpers.CheckPoolStatuses` and `test_helpers.ProcessListenOnInstance`
95115
now accept typed arguments (`CheckStatusesArgs` and `ListenOnInstanceArgs`
96-
respectively) instead of `interface{}`.
116+
respectively) instead of `interface{}` (#485).
97117
* `ConnectionPool.ConnectWithOpts()`, `ConnectionPool.Connect()` and
98118
`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
119+
`tarantool.Opts.MaxReconnects` or `tarantool.Opts.Notify` options are set for
120+
an instance connection (#581). These options conflict with the pool's own
101121
reconnection logic and produce misleading events. Use
102122
`pool.ConnectionHandler` to track connection availability instead of
103123
`tarantool.Opts.Notify`. All validation errors are combined using
104124
`errors.Join` and can be checked with `errors.Is`.
105125
* 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()`.
126+
`pool.Handler`, `pool.ConnectionInfo` to `pool.Info`,
127+
`pool.ConnectionInfo.ConnRole` to `pool.Info.Role` (#580).
128+
* Rename `pool.Pool.GetInfo()` to `pool.Pool.Info()` (#580).
129+
* Rename `pool.Pool.DoInstance()` to `pool.Pool.DoOn()` (#580).
110130
* Rename `pool.Connect()` to `pool.New()`, `pool.ConnectWithOpts()` to
111-
`pool.NewWithOpts()`.
131+
`pool.NewWithOpts()` (#580).
112132
* Rename `pool` enum constants to use prefix: `ANY``ModeAny`, `RW`
113133
`ModeRW`, `RO``ModeRO`, `PreferRW``ModePreferRW`, `PreferRO`
114134
`ModePreferRO`, `UnknownRole``RoleUnknown`, `MasterRole``RoleMaster`,
115-
`ReplicaRole``RoleReplica`.
135+
`ReplicaRole``RoleReplica` (#580).
116136
* Replaced custom `Logger` interface with `*slog.Logger` from the standard
117137
library (#504). The `Logger` interface, `ConnLogKind` type, and its constants
118138
(`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).
139+
`LogWatchEventReadFailed`, `LogBoxSessionPushUnsupported`) are removed. Use
140+
`Opts.Logger *slog.Logger` instead. Pool `Opts.Logger *slog.Logger` replaces
141+
direct `log.Printf` calls that were not customizable. By default, logs are
142+
discarded (silent). See MIGRATION.md for details.
143+
* `Stream` struct fields `Id` and `Conn` are now unexported, making `Stream` an
144+
opaque handle. Neither the stream identifier nor the underlying connection is
145+
reachable from outside the package (#471).
126146

127147
### Removed
128148

129149
* Deprecated `NewCall16Request` and `NewCall17Request` constructors. Use
130-
`NewCallRequest` instead.
150+
`NewCallRequest` instead (#579).
131151
* `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).
152+
`test_helpers.WaitUntilReconnected` reimplemented without `Retry` (#485).
153+
* `Logger` interface and `defaultLogger` type — replaced by `*slog.Logger`
154+
(#504).
155+
* `ConnLogKind` type and its constants — log messages are now identified by
156+
string constants in `log.go` (#504).
137157

138158
### Fixed
139159

140160
* Fixed the fluctuating behavior of the TestConnectionHandlerOpenUpdateClose
141161
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).
162+
* On Linux, tarantool processes started by `test_helpers.StartTarantool` are
163+
now terminated when the parent test process dies, preventing leaked instances
164+
after a panic (#586).
165+
* `test_helpers.StartTarantool` now captures the last lines of the spawned
166+
tarantool's stdout/stderr and includes them in the returned error when
167+
startup fails, so test failures show the underlying tarantool error directly
168+
instead of just "exit status 1" or a connection timeout (#587).
169+
* Reordered tests to defer `test_helpers.StopTarantoolWithCleanup` only after
170+
asserting `StartTarantool` did not return an error, so a failed start no
171+
longer panics with a nil-pointer dereference in the deferred cleanup (#586).
154172

155173
## [v2.4.1] - 2025-10-16
156174

0 commit comments

Comments
 (0)