forked from fl00r/go-tarantool-1.6
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRUD API improvements #335
Merged
Merged
Conversation
This file contains 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
Since `upsert_object` and `upsert_object_many` not support `skip_nullability_check_on_flatten` option [1], `UpsertObjectOpts` is `SimpleOperationOpts` and not `SimpleOperationObjectOpts`, same for many operation. But it is possible to get confused while studying options descriptions. 1. tarantool/crud@7504da3
DifferentialOrange
force-pushed
the
DifferentialOrange/crud-improvements
branch
6 times, most recently
from
October 5, 2023 16:03
e744f71
to
8c5fba5
Compare
Before this patch, `vshard_router`, `fields`, `bucket_id`, `mode`, `prefer_replica`, `balance` were either ignored or had a wrong name. This patch fixes the issue.
`fetch_latest_metadata` option was introduced in crud 1.2.0 [1]. 1. tarantool/crud@2675925
DifferentialOrange
force-pushed
the
DifferentialOrange/crud-improvements
branch
from
October 6, 2023 10:56
8c5fba5
to
1a7f6e6
Compare
DifferentialOrange
changed the title
Differential orange/crud improvements
CRUD API improvements
Oct 6, 2023
DifferentialOrange
force-pushed
the
DifferentialOrange/crud-improvements
branch
from
October 6, 2023 11:17
1a7f6e6
to
2f0c4c4
Compare
oleg-jukovec
approved these changes
Oct 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the patch!
DifferentialOrange
force-pushed
the
DifferentialOrange/crud-improvements
branch
from
October 6, 2023 15:20
2f0c4c4
to
f95183a
Compare
oleg-jukovec
reviewed
Oct 6, 2023
In go-tarantool, crud API result decoding assumes that there are always two response values, except for truncate. Such approach is based on actual experience: success result is always `return res, nil`, not `return res`. But this is not a feature guaranteed by crud module API, just a current implementation quirk [1] (since in Lua function result process there is no any difference). See also similar patch in tarantool/python [2]. 1. https://github.com/tarantool/crud/blob/53457477974fed42351cbd87f566d11e9f7e39bb/crud/common/schema.lua#L88 2. tarantool/tarantool-python@a4b734a
`noreturn` option was introduced in crud 1.2.0 [1]. 1. tarantool/crud@af0ce90
It is a bit confusing for non-experienced vmihailenco/msgpack users than `nil` values are actually parsed by `DecodeMapLen`, `DecodeUint64` and `DecodeBool` methods to some default value. So I decided to leave a note here.
DifferentialOrange
force-pushed
the
DifferentialOrange/crud-improvements
branch
from
October 9, 2023 07:18
f95183a
to
b844e21
Compare
DerekBum
approved these changes
Oct 9, 2023
oleg-jukovec
added a commit
that referenced
this pull request
Feb 11, 2024
Overview There are a lot of changes in the new major version. The main ones: * The `go_tarantool_call_17` build tag is no longer needed, since by default the `CallRequest` is `Call17Request`. * The `go_tarantool_msgpack_v5` build tag is no longer needed, since only the `msgpack/v5` library is used. * The `go_tarantool_ssl_disable` build tag is no longer needed, since the connector is no longer depends on `OpenSSL` by default. You could use the external library go-tlsdialer[1] to create a connection with the `ssl` transport. * Required Go version is `1.20` now. * The `Connect` function became more flexible. It now allows to create a connection with cancellation and a custom `Dialer` implementation. * It is required to use `Request` implementation types with the `Connection.Do` method instead of `Connection.<Request>` methods. * The `connection_pool` package renamed to `pool`. See the migration guide[2] 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.Connect` no 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.Connect` and `pool.Add` now accept context as the first argument, which user may cancel in process. If `pool.Connect` is canceled in progress, an error will be returned. All created connections will be closed. `iproto.Feature` type now used instead of `ProtocolFeature` (#337). `iproto.IPROTO_FEATURE_` constants now used instead of local `Feature` constants for `protocol` (#337). Change `crud` operations `Timeout` option type to `crud.OptFloat64` instead of `crud.OptUint` (#342). Change all `Upsert` and `Update` requests to accept `*tarantool.Operations` as `ops` parameters instead of `interface{}` (#348). Change `OverrideSchema(*Schema)` to `SetSchema(Schema)` (#7). Change values, stored by pointers in the `Schema`, `Space`, `Index` structs, to be stored by their values (#7). Make `Dialer` mandatory for creation a single connection (#321). Remove `Connection.RemoteAddr()`, `Connection.LocalAddr()`. Add `Addr()` function instead (#321). Remove `Connection.ClientProtocolInfo`, `Connection.ServerProtocolInfo`. Add `ProtocolInfo()` function instead, which returns the server protocol info (#321). `NewWatcher` checks the actual features of the server, rather than relying on the features provided by the user during connection creation (#321). `pool.NewWatcher` does not create watchers for connections that do not support it (#321). Rename `pool.GetPoolInfo` to `pool.GetInfo`. Change return type to `map[string]ConnectionInfo` (#321). `Response` is now an interface (#237). All responses are now implementations of the `Response` interface (#237). `SelectResponse`, `ExecuteResponse`, `PrepareResponse`, `PushResponse` are 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 a `PushResponse`. `PushCode` constant is removed. Method `Get` for `Future` now returns response data (#237). To get the actual response new `GetResponse` method has been added. Methods `AppendPush` and `SetResponse` accept response `Header` and data as their arguments. `Future` constructors now accept `Request` as their argument (#237). Operations `Ping`, `Select`, `Insert`, `Replace`, `Delete`, `Update`, `Upsert`, `Call`, `Call16`, `Call17`, `Eval`, `Execute` of a `Connector` and `Pooler` return response data instead of an actual responses (#237). `pool.Connect`, `pool.ConnetcWithOpts` and `pool.Add` use a new type `pool.Instance` to determinate connection options (#356). `pool.Connect`, `pool.ConnectWithOpts` and `pool.Add` add connections to the pool even it is unable to connect to it (#372). Required Go version from `1.13` to `1.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). `Schema` field from the `Connection` struct is removed (#7). `OkCode` and `PushCode` constants is 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). More linters on CI (#310). Meaningful description for read/write socket errors (#129). Support `operation_data` in `crud.Error` (#330). Support `fetch_latest_metadata` option for crud requests with metadata (#335). Support `noreturn` option for data change crud requests (#335). Support `crud.schema` request (#336, #351). Support `IPROTO_WATCH_ONCE` request type for Tarantool version >= 3.0.0-alpha1 (#337). Support `yield_every` option for crud select requests (#350). Support `IPROTO_FEATURE_SPACE_AND_INDEX_NAMES` for Tarantool version >= 3.0.0-alpha1 (#338). It allows to use space and index names in requests instead of their IDs. `GetSchema` function to get the actual schema (#7). Support connection via an existing socket fd (#321). `Header` struct for the response header (#237). It can be accessed via `Header()` method of the `Response` interface. `Response` method added to the `Request` interface (#237). New `LogAppendPushFailed` connection log constant (#237). It is logged when connection fails to append a push response. `ErrorNo` constant that indicates that no error has occurred while getting the response (#237). `AuthDialer` type for creating a dialer with authentication (#301). `ProtocolDialer` type for creating a dialer with `ProtocolInfo` receiving and check (#301). `GreetingDialer` type for creating a dialer, that fills `Greeting` of a connection (#301). New method `Pool.DoInstance` to execute a request on a target instance in a pool (#376). Bugfixes Race condition at roundRobinStrategy.GetNextConnection() (#309). Incorrect decoding of an MP_DECIMAL when the `scale` value is negative (#314). Incorrect options (`after`, `batch_size` and `force_map_call`) setup for crud.SelectRequest (#320). Incorrect options (`vshard_router`, `fields`, `bucket_id`, `mode`, `prefer_replica`, `balance`) setup for crud.GetRequest (#335) Splice update operation accepts 3 arguments instead of 5 (#348). Unable to use a slice of custom types as a slice of tuples or objects for `crud.*ManyRequest/crud.*ObjectManyRequest` (#365). Testing Added an ability to mock connections for tests (#237). Added new types `MockDoer`, `MockRequest` to `test_helpers`. Flaky decimal/TestSelect (#300). Tests with crud 1.4.0 (#336). Tests with case sensitive SQL (#341). Renamed `StrangerResponse` to `MockResponse` (#237). Other All Connection.<Request>, Connection.<Request>Typed and Connection.<Request>Async methods are now deprecated. Instead you should use requests objects + Connection.Do() (#241). All ConnectionPool.<Request>, ConnectionPool.<Request>Typed and ConnectionPool.<Request>Async methods are now deprecated. Instead you should use requests objects + ConnectionPool.Do() (#241). box.session.push() usage is deprecated: Future.AppendPush() and Future.GetIterator() methods, ResponseIterator and TimeoutResponseIterator types (#324). 1. https://github.com/tarantool/go-tlsdialer 2. https://github.com/tarantool/go-tarantool/blob/master/MIGRATION.md
Merged
oleg-jukovec
added a commit
that referenced
this pull request
Feb 11, 2024
Overview There are a lot of changes in the new major version. The main ones: * The `go_tarantool_call_17` build tag is no longer needed, since by default the `CallRequest` is `Call17Request`. * The `go_tarantool_msgpack_v5` build tag is no longer needed, since only the `msgpack/v5` library is used. * The `go_tarantool_ssl_disable` build tag is no longer needed, since the connector is no longer depends on `OpenSSL` by default. You could use the external library go-tlsdialer[1] to create a connection with the `ssl` transport. * Required Go version is `1.20` now. * The `Connect` function became more flexible. It now allows to create a connection with cancellation and a custom `Dialer` implementation. * It is required to use `Request` implementation types with the `Connection.Do` method instead of `Connection.<Request>` methods. * The `connection_pool` package renamed to `pool`. See the migration guide[2] 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.Connect` no 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.Connect` and `pool.Add` now accept context as the first argument, which user may cancel in process. If `pool.Connect` is canceled in progress, an error will be returned. All created connections will be closed. `iproto.Feature` type now used instead of `ProtocolFeature` (#337). `iproto.IPROTO_FEATURE_` constants now used instead of local `Feature` constants for `protocol` (#337). Change `crud` operations `Timeout` option type to `crud.OptFloat64` instead of `crud.OptUint` (#342). Change all `Upsert` and `Update` requests to accept `*tarantool.Operations` as `ops` parameters instead of `interface{}` (#348). Change `OverrideSchema(*Schema)` to `SetSchema(Schema)` (#7). Change values, stored by pointers in the `Schema`, `Space`, `Index` structs, to be stored by their values (#7). Make `Dialer` mandatory for creation a single connection (#321). Remove `Connection.RemoteAddr()`, `Connection.LocalAddr()`. Add `Addr()` function instead (#321). Remove `Connection.ClientProtocolInfo`, `Connection.ServerProtocolInfo`. Add `ProtocolInfo()` function instead, which returns the server protocol info (#321). `NewWatcher` checks the actual features of the server, rather than relying on the features provided by the user during connection creation (#321). `pool.NewWatcher` does not create watchers for connections that do not support it (#321). Rename `pool.GetPoolInfo` to `pool.GetInfo`. Change return type to `map[string]ConnectionInfo` (#321). `Response` is now an interface (#237). All responses are now implementations of the `Response` interface (#237). `SelectResponse`, `ExecuteResponse`, `PrepareResponse`, `PushResponse` are 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 a `PushResponse`. `PushCode` constant is removed. Method `Get` for `Future` now returns response data (#237). To get the actual response new `GetResponse` method has been added. Methods `AppendPush` and `SetResponse` accept response `Header` and data as their arguments. `Future` constructors now accept `Request` as their argument (#237). Operations `Ping`, `Select`, `Insert`, `Replace`, `Delete`, `Update`, `Upsert`, `Call`, `Call16`, `Call17`, `Eval`, `Execute` of a `Connector` and `Pooler` return response data instead of an actual responses (#237). `pool.Connect`, `pool.ConnetcWithOpts` and `pool.Add` use a new type `pool.Instance` to determinate connection options (#356). `pool.Connect`, `pool.ConnectWithOpts` and `pool.Add` add connections to the pool even it is unable to connect to it (#372). Required Go version from `1.13` to `1.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). `Schema` field from the `Connection` struct is removed (#7). `OkCode` and `PushCode` constants is 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). More linters on CI (#310). Meaningful description for read/write socket errors (#129). Support `operation_data` in `crud.Error` (#330). Support `fetch_latest_metadata` option for crud requests with metadata (#335). Support `noreturn` option for data change crud requests (#335). Support `crud.schema` request (#336, #351). Support `IPROTO_WATCH_ONCE` request type for Tarantool version >= 3.0.0-alpha1 (#337). Support `yield_every` option for crud select requests (#350). Support `IPROTO_FEATURE_SPACE_AND_INDEX_NAMES` for Tarantool version >= 3.0.0-alpha1 (#338). It allows to use space and index names in requests instead of their IDs. `GetSchema` function to get the actual schema (#7). Support connection via an existing socket fd (#321). `Header` struct for the response header (#237). It can be accessed via `Header()` method of the `Response` interface. `Response` method added to the `Request` interface (#237). New `LogAppendPushFailed` connection log constant (#237). It is logged when connection fails to append a push response. `ErrorNo` constant that indicates that no error has occurred while getting the response (#237). `AuthDialer` type for creating a dialer with authentication (#301). `ProtocolDialer` type for creating a dialer with `ProtocolInfo` receiving and check (#301). `GreetingDialer` type for creating a dialer, that fills `Greeting` of a connection (#301). New method `Pool.DoInstance` to execute a request on a target instance in a pool (#376). Bugfixes Race condition at roundRobinStrategy.GetNextConnection() (#309). Incorrect decoding of an MP_DECIMAL when the `scale` value is negative (#314). Incorrect options (`after`, `batch_size` and `force_map_call`) setup for crud.SelectRequest (#320). Incorrect options (`vshard_router`, `fields`, `bucket_id`, `mode`, `prefer_replica`, `balance`) setup for crud.GetRequest (#335). Splice update operation accepts 3 arguments instead of 5 (#348). Unable to use a slice of custom types as a slice of tuples or objects for `crud.*ManyRequest/crud.*ObjectManyRequest` (#365). Testing Added an ability to mock connections for tests (#237). Added new types `MockDoer`, `MockRequest` to `test_helpers`. Fixed flaky decimal/TestSelect (#300). Fixed tests with crud 1.4.0 (#336). Fixed tests with case sensitive SQL (#341). Renamed `StrangerResponse` to `MockResponse` (#237). Other All Connection.<Request>, Connection.<Request>Typed and Connection.<Request>Async methods are now deprecated. Instead you should use requests objects + Connection.Do() (#241). All ConnectionPool.<Request>, ConnectionPool.<Request>Typed and ConnectionPool.<Request>Async methods are now deprecated. Instead you should use requests objects + ConnectionPool.Do() (#241). box.session.push() usage is deprecated: Future.AppendPush() and Future.GetIterator() methods, ResponseIterator and TimeoutResponseIterator types (#324). 1. https://github.com/tarantool/go-tlsdialer 2. https://github.com/tarantool/go-tarantool/blob/master/MIGRATION.md
oleg-jukovec
added a commit
that referenced
this pull request
Feb 11, 2024
Overview There are a lot of changes in the new major version. The main ones: * The `go_tarantool_call_17` build tag is no longer needed, since by default the `CallRequest` is `Call17Request`. * The `go_tarantool_msgpack_v5` build tag is no longer needed, since only the `msgpack/v5` library is used. * The `go_tarantool_ssl_disable` build tag is no longer needed, since the connector is no longer depends on `OpenSSL` by default. You could use the external library go-tlsdialer[1] to create a connection with the `ssl` transport. * Required Go version is `1.20` now. * The `Connect` function became more flexible. It now allows to create a connection with cancellation and a custom `Dialer` implementation. * It is required to use `Request` implementation types with the `Connection.Do` method instead of `Connection.<Request>` methods. * The `connection_pool` package renamed to `pool`. See the migration guide[2] 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.Connect` no 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.Connect` and `pool.Add` now accept context as the first argument, which user may cancel in process. If `pool.Connect` is canceled in progress, an error will be returned. All created connections will be closed. `iproto.Feature` type now used instead of `ProtocolFeature` (#337). `iproto.IPROTO_FEATURE_` constants now used instead of local `Feature` constants for `protocol` (#337). Change `crud` operations `Timeout` option type to `crud.OptFloat64` instead of `crud.OptUint` (#342). Change all `Upsert` and `Update` requests to accept `*tarantool.Operations` as `ops` parameters instead of `interface{}` (#348). Change `OverrideSchema(*Schema)` to `SetSchema(Schema)` (#7). Change values, stored by pointers in the `Schema`, `Space`, `Index` structs, to be stored by their values (#7). Make `Dialer` mandatory for creation a single connection (#321). Remove `Connection.RemoteAddr()`, `Connection.LocalAddr()`. Add `Addr()` function instead (#321). Remove `Connection.ClientProtocolInfo`, `Connection.ServerProtocolInfo`. Add `ProtocolInfo()` function instead, which returns the server protocol info (#321). `NewWatcher` checks the actual features of the server, rather than relying on the features provided by the user during connection creation (#321). `pool.NewWatcher` does not create watchers for connections that do not support it (#321). Rename `pool.GetPoolInfo` to `pool.GetInfo`. Change return type to `map[string]ConnectionInfo` (#321). `Response` is now an interface (#237). All responses are now implementations of the `Response` interface (#237). `SelectResponse`, `ExecuteResponse`, `PrepareResponse`, `PushResponse` are 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 a `PushResponse`. `PushCode` constant is removed. Method `Get` for `Future` now returns response data (#237). To get the actual response new `GetResponse` method has been added. Methods `AppendPush` and `SetResponse` accept response `Header` and data as their arguments. `Future` constructors now accept `Request` as their argument (#237). Operations `Ping`, `Select`, `Insert`, `Replace`, `Delete`, `Update`, `Upsert`, `Call`, `Call16`, `Call17`, `Eval`, `Execute` of a `Connector` and `Pooler` return response data instead of an actual responses (#237). `pool.Connect`, `pool.ConnetcWithOpts` and `pool.Add` use a new type `pool.Instance` to determinate connection options (#356). `pool.Connect`, `pool.ConnectWithOpts` and `pool.Add` add connections to the pool even it is unable to connect to it (#372). Required Go version from `1.13` to `1.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). `Schema` field from the `Connection` struct is removed (#7). `OkCode` and `PushCode` constants is 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_data` in `crud.Error` (#330). Support `fetch_latest_metadata` option for crud requests with metadata (#335). Support `noreturn` option for data change crud requests (#335). Support `crud.schema` request (#336, #351). Support `IPROTO_WATCH_ONCE` request type for Tarantool version >= 3.0.0-alpha1 (#337). Support `yield_every` option for crud select requests (#350). Support `IPROTO_FEATURE_SPACE_AND_INDEX_NAMES` for Tarantool version >= 3.0.0-alpha1 (#338). It allows to use space and index names in requests instead of their IDs. `GetSchema` function to get the actual schema (#7). Support connection via an existing socket fd (#321). `Header` struct for the response header (#237). It can be accessed via `Header()` method of the `Response` interface. `Response` method added to the `Request` interface (#237). New `LogAppendPushFailed` connection log constant (#237). It is logged when connection fails to append a push response. `ErrorNo` constant that indicates that no error has occurred while getting the response (#237). `AuthDialer` type for creating a dialer with authentication (#301). `ProtocolDialer` type for creating a dialer with `ProtocolInfo` receiving and check (#301). `GreetingDialer` type for creating a dialer, that fills `Greeting` of a connection (#301). New method `Pool.DoInstance` to execute a request on a target instance in a pool (#376). Bugfixes Race condition at roundRobinStrategy.GetNextConnection() (#309). Incorrect decoding of an MP_DECIMAL when the `scale` value is negative (#314). Incorrect options (`after`, `batch_size` and `force_map_call`) setup for crud.SelectRequest (#320). Incorrect options (`vshard_router`, `fields`, `bucket_id`, `mode`, `prefer_replica`, `balance`) setup for crud.GetRequest (#335). Splice update operation accepts 3 arguments instead of 5 (#348). Unable to use a slice of custom types as a slice of tuples or objects for `crud.*ManyRequest/crud.*ObjectManyRequest` (#365). Testing More linters on CI (#310). Added an ability to mock connections for tests (#237). Added new types `MockDoer`, `MockRequest` to `test_helpers`. Fixed flaky decimal/TestSelect (#300). Fixed tests with crud 1.4.0 (#336). Fixed tests with case sensitive SQL (#341). Renamed `StrangerResponse` to `MockResponse` (#237). Other All Connection.<Request>, Connection.<Request>Typed and Connection.<Request>Async methods are now deprecated. Instead you should use requests objects + Connection.Do() (#241). All ConnectionPool.<Request>, ConnectionPool.<Request>Typed and ConnectionPool.<Request>Async methods are now deprecated. Instead you should use requests objects + ConnectionPool.Do() (#241). box.session.push() usage is deprecated: Future.AppendPush() and Future.GetIterator() methods, ResponseIterator and TimeoutResponseIterator types (#324). 1. https://github.com/tarantool/go-tlsdialer 2. https://github.com/tarantool/go-tarantool/blob/master/MIGRATION.md
oleg-jukovec
added a commit
that referenced
this pull request
Feb 11, 2024
Overview There are a lot of changes in the new major version. The main ones: * The `go_tarantool_call_17` build tag is no longer needed, since by default the `CallRequest` is `Call17Request`. * The `go_tarantool_msgpack_v5` build tag is no longer needed, since only the `msgpack/v5` library is used. * The `go_tarantool_ssl_disable` build tag is no longer needed, since the connector is no longer depends on `OpenSSL` by default. You could use the external library go-tlsdialer[1] to create a connection with the `ssl` transport. * Required Go version is `1.20` now. * The `Connect` function became more flexible. It now allows to create a connection with cancellation and a custom `Dialer` implementation. * It is required to use `Request` implementation types with the `Connection.Do` method instead of `Connection.<Request>` methods. * The `connection_pool` package renamed to `pool`. See the migration guide[2] 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.Connect` no 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.Connect` and `pool.Add` now accept context as the first argument, which user may cancel in process. If `pool.Connect` is canceled in progress, an error will be returned. All created connections will be closed. `iproto.Feature` type now used instead of `ProtocolFeature` (#337). `iproto.IPROTO_FEATURE_` constants now used instead of local `Feature` constants for `protocol` (#337). Change `crud` operations `Timeout` option type to `crud.OptFloat64` instead of `crud.OptUint` (#342). Change all `Upsert` and `Update` requests to accept `*tarantool.Operations` as `ops` parameters instead of `interface{}` (#348). Change `OverrideSchema(*Schema)` to `SetSchema(Schema)` (#7). Change values, stored by pointers in the `Schema`, `Space`, `Index` structs, to be stored by their values (#7). Make `Dialer` mandatory for creation a single connection (#321). Remove `Connection.RemoteAddr()`, `Connection.LocalAddr()`. Add `Addr()` function instead (#321). Remove `Connection.ClientProtocolInfo`, `Connection.ServerProtocolInfo`. Add `ProtocolInfo()` function instead, which returns the server protocol info (#321). `NewWatcher` checks the actual features of the server, rather than relying on the features provided by the user during connection creation (#321). `pool.NewWatcher` does not create watchers for connections that do not support it (#321). Rename `pool.GetPoolInfo` to `pool.GetInfo`. Change return type to `map[string]ConnectionInfo` (#321). `Response` is now an interface (#237). All responses are now implementations of the `Response` interface (#237). `SelectResponse`, `ExecuteResponse`, `PrepareResponse`, `PushResponse` are 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 a `PushResponse`. `PushCode` constant is removed. Method `Get` for `Future` now returns response data (#237). To get the actual response new `GetResponse` method has been added. Methods `AppendPush` and `SetResponse` accept response `Header` and data as their arguments. `Future` constructors now accept `Request` as their argument (#237). Operations `Ping`, `Select`, `Insert`, `Replace`, `Delete`, `Update`, `Upsert`, `Call`, `Call16`, `Call17`, `Eval`, `Execute` of a `Connector` and `Pooler` return response data instead of an actual responses (#237). `pool.Connect`, `pool.ConnetcWithOpts` and `pool.Add` use a new type `pool.Instance` to determinate connection options (#356). `pool.Connect`, `pool.ConnectWithOpts` and `pool.Add` add connections to the pool even it is unable to connect to it (#372). Required Go version from `1.13` to `1.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). `Schema` field from the `Connection` struct is removed (#7). `OkCode` and `PushCode` constants is 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_data` in `crud.Error` (#330). Support `fetch_latest_metadata` option for crud requests with metadata (#335). Support `noreturn` option for data change crud requests (#335). Support `crud.schema` request (#336, #351). Support `IPROTO_WATCH_ONCE` request type for Tarantool version >= 3.0.0-alpha1 (#337). Support `yield_every` option for crud select requests (#350). Support `IPROTO_FEATURE_SPACE_AND_INDEX_NAMES` for Tarantool version >= 3.0.0-alpha1 (#338). It allows to use space and index names in requests instead of their IDs. `GetSchema` function to get the actual schema (#7). Support connection via an existing socket fd (#321). `Header` struct for the response header (#237). It can be accessed via `Header()` method of the `Response` interface. `Response` method added to the `Request` interface (#237). New `LogAppendPushFailed` connection log constant (#237). It is logged when connection fails to append a push response. `ErrorNo` constant that indicates that no error has occurred while getting the response (#237). `AuthDialer` type for creating a dialer with authentication (#301). `ProtocolDialer` type for creating a dialer with `ProtocolInfo` receiving and check (#301). `GreetingDialer` type for creating a dialer, that fills `Greeting` of a connection (#301). New method `Pool.DoInstance` to execute a request on a target instance in a pool (#376). Bugfixes Race condition at roundRobinStrategy.GetNextConnection() (#309). Incorrect decoding of an MP_DECIMAL when the `scale` value is negative (#314). Incorrect options (`after`, `batch_size` and `force_map_call`) setup for crud.SelectRequest (#320). Incorrect options (`vshard_router`, `fields`, `bucket_id`, `mode`, `prefer_replica`, `balance`) setup for crud.GetRequest (#335). Splice update operation accepts 3 arguments instead of 5 (#348). Unable to use a slice of custom types as a slice of tuples or objects for `crud.*ManyRequest/crud.*ObjectManyRequest` (#365). Testing More linters on CI (#310). Added an ability to mock connections for tests (#237). Added new types `MockDoer`, `MockRequest` to `test_helpers`. Fixed flaky decimal/TestSelect (#300). Fixed tests with crud 1.4.0 (#336). Fixed tests with case sensitive SQL (#341). Renamed `StrangerResponse` to `MockResponse` (#237). Other All Connection.<Request>, Connection.<Request>Typed and Connection.<Request>Async methods are now deprecated. Instead you should use requests objects + Connection.Do() (#241). All ConnectionPool.<Request>, ConnectionPool.<Request>Typed and ConnectionPool.<Request>Async methods are now deprecated. Instead you should use requests objects + ConnectionPool.Do() (#241). box.session.push() usage is deprecated: Future.AppendPush() and Future.GetIterator() methods, ResponseIterator and TimeoutResponseIterator types (#324). 1. https://github.com/tarantool/go-tlsdialer 2. https://github.com/tarantool/go-tarantool/blob/master/MIGRATION.md
oleg-jukovec
added a commit
that referenced
this pull request
Feb 12, 2024
Overview There are a lot of changes in the new major version. The main ones: * The `go_tarantool_call_17` build tag is no longer needed, since by default the `CallRequest` is `Call17Request`. * The `go_tarantool_msgpack_v5` build tag is no longer needed, since only the `msgpack/v5` library is used. * The `go_tarantool_ssl_disable` build tag is no longer needed, since the connector is no longer depends on `OpenSSL` by default. You could use the external library go-tlsdialer[1] to create a connection with the `ssl` transport. * Required Go version is `1.20` now. * The `Connect` function became more flexible. It now allows to create a connection with cancellation and a custom `Dialer` implementation. * It is required to use `Request` implementation types with the `Connection.Do` method instead of `Connection.<Request>` methods. * The `connection_pool` package renamed to `pool`. See the migration guide[2] 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.Connect` no 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.Connect` and `pool.Add` now accept context as the first argument, which user may cancel in process. If `pool.Connect` is canceled in progress, an error will be returned. All created connections will be closed. `iproto.Feature` type now used instead of `ProtocolFeature` (#337). `iproto.IPROTO_FEATURE_` constants now used instead of local `Feature` constants for `protocol` (#337). Change `crud` operations `Timeout` option type to `crud.OptFloat64` instead of `crud.OptUint` (#342). Change all `Upsert` and `Update` requests to accept `*tarantool.Operations` as `ops` parameters instead of `interface{}` (#348). Change `OverrideSchema(*Schema)` to `SetSchema(Schema)` (#7). Change values, stored by pointers in the `Schema`, `Space`, `Index` structs, to be stored by their values (#7). Make `Dialer` mandatory for creation a single connection (#321). Remove `Connection.RemoteAddr()`, `Connection.LocalAddr()`. Add `Addr()` function instead (#321). Remove `Connection.ClientProtocolInfo`, `Connection.ServerProtocolInfo`. Add `ProtocolInfo()` function instead, which returns the server protocol info (#321). `NewWatcher` checks the actual features of the server, rather than relying on the features provided by the user during connection creation (#321). `pool.NewWatcher` does not create watchers for connections that do not support it (#321). Rename `pool.GetPoolInfo` to `pool.GetInfo`. Change return type to `map[string]ConnectionInfo` (#321). `Response` is now an interface (#237). All responses are now implementations of the `Response` interface (#237). `SelectResponse`, `ExecuteResponse`, `PrepareResponse`, `PushResponse` are 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 a `PushResponse`. `PushCode` constant is removed. Method `Get` for `Future` now returns response data (#237). To get the actual response new `GetResponse` method has been added. Methods `AppendPush` and `SetResponse` accept response `Header` and data as their arguments. `Future` constructors now accept `Request` as their argument (#237). Operations `Ping`, `Select`, `Insert`, `Replace`, `Delete`, `Update`, `Upsert`, `Call`, `Call16`, `Call17`, `Eval`, `Execute` of a `Connector` and `Pooler` return response data instead of an actual responses (#237). `pool.Connect`, `pool.ConnetcWithOpts` and `pool.Add` use a new type `pool.Instance` to determinate connection options (#356). `pool.Connect`, `pool.ConnectWithOpts` and `pool.Add` add connections to the pool even it is unable to connect to it (#372). Required Go version from `1.13` to `1.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). `Schema` field from the `Connection` struct is removed (#7). `OkCode` and `PushCode` constants is 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_data` in `crud.Error` (#330). Support `fetch_latest_metadata` option for crud requests with metadata (#335). Support `noreturn` option for data change crud requests (#335). Support `crud.schema` request (#336, #351). Support `IPROTO_WATCH_ONCE` request type for Tarantool version >= 3.0.0-alpha1 (#337). Support `yield_every` option for crud select requests (#350). Support `IPROTO_FEATURE_SPACE_AND_INDEX_NAMES` for Tarantool version >= 3.0.0-alpha1 (#338). It allows to use space and index names in requests instead of their IDs. `GetSchema` function to get the actual schema (#7). Support connection via an existing socket fd (#321). `Header` struct for the response header (#237). It can be accessed via `Header()` method of the `Response` interface. `Response` method added to the `Request` interface (#237). New `LogAppendPushFailed` connection log constant (#237). It is logged when connection fails to append a push response. `ErrorNo` constant that indicates that no error has occurred while getting the response (#237). `AuthDialer` type for creating a dialer with authentication (#301). `ProtocolDialer` type for creating a dialer with `ProtocolInfo` receiving and check (#301). `GreetingDialer` type for creating a dialer, that fills `Greeting` of a connection (#301). New method `Pool.DoInstance` to execute a request on a target instance in a pool (#376). Bugfixes Race condition at roundRobinStrategy.GetNextConnection() (#309). Incorrect decoding of an MP_DECIMAL when the `scale` value is negative (#314). Incorrect options (`after`, `batch_size` and `force_map_call`) setup for crud.SelectRequest (#320). Incorrect options (`vshard_router`, `fields`, `bucket_id`, `mode`, `prefer_replica`, `balance`) setup for crud.GetRequest (#335). Splice update operation accepts 3 arguments instead of 5 (#348). Unable to use a slice of custom types as a slice of tuples or objects for `crud.*ManyRequest/crud.*ObjectManyRequest` (#365). Testing More linters on CI (#310). Added an ability to mock connections for tests (#237). Added new types `MockDoer`, `MockRequest` to `test_helpers`. Fixed flaky decimal/TestSelect (#300). Fixed tests with crud 1.4.0 (#336). Fixed tests with case sensitive SQL (#341). Renamed `StrangerResponse` to `MockResponse` (#237). Other All Connection.<Request>, Connection.<Request>Typed and Connection.<Request>Async methods are now deprecated. Instead you should use requests objects + Connection.Do() (#241). All ConnectionPool.<Request>, ConnectionPool.<Request>Typed and ConnectionPool.<Request>Async methods are now deprecated. Instead you should use requests objects + ConnectionPool.Do() (#241). box.session.push() usage is deprecated: Future.AppendPush() and Future.GetIterator() methods, ResponseIterator and TimeoutResponseIterator types (#324). 1. https://github.com/tarantool/go-tlsdialer 2. https://github.com/tarantool/go-tarantool/blob/master/MIGRATION.md
oleg-jukovec
added a commit
that referenced
this pull request
Feb 12, 2024
Overview There are a lot of changes in the new major version. The main ones: * The `go_tarantool_call_17` build tag is no longer needed, since by default the `CallRequest` is `Call17Request`. * The `go_tarantool_msgpack_v5` build tag is no longer needed, since only the `msgpack/v5` library is used. * The `go_tarantool_ssl_disable` build tag is no longer needed, since the connector is no longer depends on `OpenSSL` by default. You could use the external library go-tlsdialer[1] to create a connection with the `ssl` transport. * Required Go version is `1.20` now. * The `Connect` function became more flexible. It now allows to create a connection with cancellation and a custom `Dialer` implementation. * It is required to use `Request` implementation types with the `Connection.Do` method instead of `Connection.<Request>` methods. * The `connection_pool` package renamed to `pool`. See the migration guide[2] 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.Connect` no 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.Connect` and `pool.Add` now accept context as the first argument, which user may cancel in process. If `pool.Connect` is canceled in progress, an error will be returned. All created connections will be closed. `iproto.Feature` type now used instead of `ProtocolFeature` (#337). `iproto.IPROTO_FEATURE_` constants now used instead of local `Feature` constants for `protocol` (#337). Change `crud` operations `Timeout` option type to `crud.OptFloat64` instead of `crud.OptUint` (#342). Change all `Upsert` and `Update` requests to accept `*tarantool.Operations` as `ops` parameters instead of `interface{}` (#348). Change `OverrideSchema(*Schema)` to `SetSchema(Schema)` (#7). Change values, stored by pointers in the `Schema`, `Space`, `Index` structs, to be stored by their values (#7). Make `Dialer` mandatory for creation a single connection (#321). Remove `Connection.RemoteAddr()`, `Connection.LocalAddr()`. Add `Addr()` function instead (#321). Remove `Connection.ClientProtocolInfo`, `Connection.ServerProtocolInfo`. Add `ProtocolInfo()` function instead, which returns the server protocol info (#321). `NewWatcher` checks the actual features of the server, rather than relying on the features provided by the user during connection creation (#321). `pool.NewWatcher` does not create watchers for connections that do not support it (#321). Rename `pool.GetPoolInfo` to `pool.GetInfo`. Change return type to `map[string]ConnectionInfo` (#321). `Response` is now an interface (#237). All responses are now implementations of the `Response` interface (#237). `SelectResponse`, `ExecuteResponse`, `PrepareResponse`, `PushResponse` are 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 a `PushResponse`. `PushCode` constant is removed. Method `Get` for `Future` now returns response data (#237). To get the actual response new `GetResponse` method has been added. Methods `AppendPush` and `SetResponse` accept response `Header` and data as their arguments. `Future` constructors now accept `Request` as their argument (#237). Operations `Ping`, `Select`, `Insert`, `Replace`, `Delete`, `Update`, `Upsert`, `Call`, `Call16`, `Call17`, `Eval`, `Execute` of a `Connector` and `Pooler` return response data instead of an actual responses (#237). `pool.Connect`, `pool.ConnetcWithOpts` and `pool.Add` use a new type `pool.Instance` to determinate connection options (#356). `pool.Connect`, `pool.ConnectWithOpts` and `pool.Add` add connections to the pool even it is unable to connect to it (#372). Required Go version from `1.13` to `1.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). `Schema` field from the `Connection` struct is removed (#7). `OkCode` and `PushCode` constants is 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_data` in `crud.Error` (#330). Support `fetch_latest_metadata` option for crud requests with metadata (#335). Support `noreturn` option for data change crud requests (#335). Support `crud.schema` request (#336, #351). Support `IPROTO_WATCH_ONCE` request type for Tarantool version >= 3.0.0-alpha1 (#337). Support `yield_every` option for crud select requests (#350). Support `IPROTO_FEATURE_SPACE_AND_INDEX_NAMES` for Tarantool version >= 3.0.0-alpha1 (#338). It allows to use space and index names in requests instead of their IDs. `GetSchema` function to get the actual schema (#7). Support connection via an existing socket fd (#321). `Header` struct for the response header (#237). It can be accessed via `Header()` method of the `Response` interface. `Response` method added to the `Request` interface (#237). New `LogAppendPushFailed` connection log constant (#237). It is logged when connection fails to append a push response. `ErrorNo` constant that indicates that no error has occurred while getting the response (#237). `AuthDialer` type for creating a dialer with authentication (#301). `ProtocolDialer` type for creating a dialer with `ProtocolInfo` receiving and check (#301). `GreetingDialer` type for creating a dialer, that fills `Greeting` of a connection (#301). New method `Pool.DoInstance` to execute a request on a target instance in a pool (#376). Bugfixes Race condition at roundRobinStrategy.GetNextConnection() (#309). Incorrect decoding of an MP_DECIMAL when the `scale` value is negative (#314). Incorrect options (`after`, `batch_size` and `force_map_call`) setup for crud.SelectRequest (#320). Incorrect options (`vshard_router`, `fields`, `bucket_id`, `mode`, `prefer_replica`, `balance`) setup for crud.GetRequest (#335). Splice update operation accepts 3 arguments instead of 5 (#348). Unable to use a slice of custom types as a slice of tuples or objects for `crud.*ManyRequest/crud.*ObjectManyRequest` (#365). Testing More linters on CI (#310). Added an ability to mock connections for tests (#237). Added new types `MockDoer`, `MockRequest` to `test_helpers`. Fixed flaky decimal/TestSelect (#300). Fixed tests with crud 1.4.0 (#336). Fixed tests with case sensitive SQL (#341). Renamed `StrangerResponse` to `MockResponse` (#237). Other All Connection.<Request>, Connection.<Request>Typed and Connection.<Request>Async methods are now deprecated. Instead you should use requests objects + Connection.Do() (#241). All ConnectionPool.<Request>, ConnectionPool.<Request>Typed and ConnectionPool.<Request>Async methods are now deprecated. Instead you should use requests objects + ConnectionPool.Do() (#241). box.session.push() usage is deprecated: Future.AppendPush() and Future.GetIterator() methods, ResponseIterator and TimeoutResponseIterator types (#324). 1. https://github.com/tarantool/go-tlsdialer 2. https://github.com/tarantool/go-tarantool/blob/master/MIGRATION.md
oleg-jukovec
added a commit
that referenced
this pull request
Feb 12, 2024
Overview There are a lot of changes in the new major version. The main ones: * The `go_tarantool_call_17` build tag is no longer needed, since by default the `CallRequest` is `Call17Request`. * The `go_tarantool_msgpack_v5` build tag is no longer needed, since only the `msgpack/v5` library is used. * The `go_tarantool_ssl_disable` build tag is no longer needed, since the connector is no longer depends on `OpenSSL` by default. You could use the external library go-tlsdialer[1] to create a connection with the `ssl` transport. * Required Go version is `1.20` now. * The `Connect` function became more flexible. It now allows to create a connection with cancellation and a custom `Dialer` implementation. * It is required to use `Request` implementation types with the `Connection.Do` method instead of `Connection.<Request>` methods. * The `connection_pool` package renamed to `pool`. See the migration guide[2] 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.Connect` no 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.Connect` and `pool.Add` now accept context as the first argument, which user may cancel in process. If `pool.Connect` is canceled in progress, an error will be returned. All created connections will be closed. `iproto.Feature` type now used instead of `ProtocolFeature` (#337). `iproto.IPROTO_FEATURE_` constants now used instead of local `Feature` constants for `protocol` (#337). Change `crud` operations `Timeout` option type to `crud.OptFloat64` instead of `crud.OptUint` (#342). Change all `Upsert` and `Update` requests to accept `*tarantool.Operations` as `ops` parameters instead of `interface{}` (#348). Change `OverrideSchema(*Schema)` to `SetSchema(Schema)` (#7). Change values, stored by pointers in the `Schema`, `Space`, `Index` structs, to be stored by their values (#7). Make `Dialer` mandatory for creation a single connection (#321). Remove `Connection.RemoteAddr()`, `Connection.LocalAddr()`. Add `Addr()` function instead (#321). Remove `Connection.ClientProtocolInfo`, `Connection.ServerProtocolInfo`. Add `ProtocolInfo()` function instead, which returns the server protocol info (#321). `NewWatcher` checks the actual features of the server, rather than relying on the features provided by the user during connection creation (#321). `pool.NewWatcher` does not create watchers for connections that do not support it (#321). Rename `pool.GetPoolInfo` to `pool.GetInfo`. Change return type to `map[string]ConnectionInfo` (#321). `Response` is now an interface (#237). All responses are now implementations of the `Response` interface (#237). `SelectResponse`, `ExecuteResponse`, `PrepareResponse`, `PushResponse` are 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 a `PushResponse`. `PushCode` constant is removed. Method `Get` for `Future` now returns response data (#237). To get the actual response new `GetResponse` method has been added. Methods `AppendPush` and `SetResponse` accept response `Header` and data as their arguments. `Future` constructors now accept `Request` as their argument (#237). Operations `Ping`, `Select`, `Insert`, `Replace`, `Delete`, `Update`, `Upsert`, `Call`, `Call16`, `Call17`, `Eval`, `Execute` of a `Connector` and `Pooler` return response data instead of an actual responses (#237). `pool.Connect`, `pool.ConnetcWithOpts` and `pool.Add` use a new type `pool.Instance` to determinate connection options (#356). `pool.Connect`, `pool.ConnectWithOpts` and `pool.Add` add connections to the pool even it is unable to connect to it (#372). Required Go version from `1.13` to `1.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). `Schema` field from the `Connection` struct is removed (#7). `OkCode` and `PushCode` constants is 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_data` in `crud.Error` (#330). Support `fetch_latest_metadata` option for crud requests with metadata (#335). Support `noreturn` option for data change crud requests (#335). Support `crud.schema` request (#336, #351). Support `IPROTO_WATCH_ONCE` request type for Tarantool version >= 3.0.0-alpha1 (#337). Support `yield_every` option for crud select requests (#350). Support `IPROTO_FEATURE_SPACE_AND_INDEX_NAMES` for Tarantool version >= 3.0.0-alpha1 (#338). It allows to use space and index names in requests instead of their IDs. `GetSchema` function to get the actual schema (#7). Support connection via an existing socket fd (#321). `Header` struct for the response header (#237). It can be accessed via `Header()` method of the `Response` interface. `Response` method added to the `Request` interface (#237). New `LogAppendPushFailed` connection log constant (#237). It is logged when connection fails to append a push response. `ErrorNo` constant that indicates that no error has occurred while getting the response (#237). `AuthDialer` type for creating a dialer with authentication (#301). `ProtocolDialer` type for creating a dialer with `ProtocolInfo` receiving and check (#301). `GreetingDialer` type for creating a dialer, that fills `Greeting` of a connection (#301). New method `Pool.DoInstance` to execute a request on a target instance in a pool (#376). Bugfixes Race condition at roundRobinStrategy.GetNextConnection() (#309). Incorrect decoding of an MP_DECIMAL when the `scale` value is negative (#314). Incorrect options (`after`, `batch_size` and `force_map_call`) setup for crud.SelectRequest (#320). Incorrect options (`vshard_router`, `fields`, `bucket_id`, `mode`, `prefer_replica`, `balance`) setup for crud.GetRequest (#335). Splice update operation accepts 3 arguments instead of 5 (#348). Unable to use a slice of custom types as a slice of tuples or objects for `crud.*ManyRequest/crud.*ObjectManyRequest` (#365). Testing More linters on CI (#310). Added an ability to mock connections for tests (#237). Added new types `MockDoer`, `MockRequest` to `test_helpers`. Fixed flaky decimal/TestSelect (#300). Fixed tests with crud 1.4.0 (#336). Fixed tests with case sensitive SQL (#341). Renamed `StrangerResponse` to `MockResponse` (#237). Other All Connection.<Request>, Connection.<Request>Typed and Connection.<Request>Async methods are now deprecated. Instead you should use requests objects + Connection.Do() (#241). All ConnectionPool.<Request>, ConnectionPool.<Request>Typed and ConnectionPool.<Request>Async methods are now deprecated. Instead you should use requests objects + ConnectionPool.Do() (#241). box.session.push() usage is deprecated: Future.AppendPush() and Future.GetIterator() methods, ResponseIterator and TimeoutResponseIterator types (#324). 1. https://github.com/tarantool/go-tlsdialer 2. https://github.com/tarantool/go-tarantool/blob/master/MIGRATION.md
oleg-jukovec
added a commit
that referenced
this pull request
Feb 12, 2024
Overview There are a lot of changes in the new major version. The main ones: * The `go_tarantool_call_17` build tag is no longer needed, since by default the `CallRequest` is `Call17Request`. * The `go_tarantool_msgpack_v5` build tag is no longer needed, since only the `msgpack/v5` library is used. * The `go_tarantool_ssl_disable` build tag is no longer needed, since the connector is no longer depends on `OpenSSL` by default. You could use the external library go-tlsdialer[1] to create a connection with the `ssl` transport. * Required Go version is `1.20` now. * The `Connect` function became more flexible. It now allows to create a connection with cancellation and a custom `Dialer` implementation. * It is required to use `Request` implementation types with the `Connection.Do` method instead of `Connection.<Request>` methods. * The `connection_pool` package renamed to `pool`. See the migration guide[2] 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.Connect` no 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.Connect` and `pool.Add` now accept context as the first argument, which user may cancel in process. If `pool.Connect` is canceled in progress, an error will be returned. All created connections will be closed. `iproto.Feature` type now used instead of `ProtocolFeature` (#337). `iproto.IPROTO_FEATURE_` constants now used instead of local `Feature` constants for `protocol` (#337). Change `crud` operations `Timeout` option type to `crud.OptFloat64` instead of `crud.OptUint` (#342). Change all `Upsert` and `Update` requests to accept `*tarantool.Operations` as `ops` parameters instead of `interface{}` (#348). Change `OverrideSchema(*Schema)` to `SetSchema(Schema)` (#7). Change values, stored by pointers in the `Schema`, `Space`, `Index` structs, to be stored by their values (#7). Make `Dialer` mandatory for creation a single connection (#321). Remove `Connection.RemoteAddr()`, `Connection.LocalAddr()`. Add `Addr()` function instead (#321). Remove `Connection.ClientProtocolInfo`, `Connection.ServerProtocolInfo`. Add `ProtocolInfo()` function instead, which returns the server protocol info (#321). `NewWatcher` checks the actual features of the server, rather than relying on the features provided by the user during connection creation (#321). `pool.NewWatcher` does not create watchers for connections that do not support it (#321). Rename `pool.GetPoolInfo` to `pool.GetInfo`. Change return type to `map[string]ConnectionInfo` (#321). `Response` is now an interface (#237). All responses are now implementations of the `Response` interface (#237). `SelectResponse`, `ExecuteResponse`, `PrepareResponse`, `PushResponse` are 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 a `PushResponse`. `PushCode` constant is removed. Method `Get` for `Future` now returns response data (#237). To get the actual response new `GetResponse` method has been added. Methods `AppendPush` and `SetResponse` accept response `Header` and data as their arguments. `Future` constructors now accept `Request` as their argument (#237). Operations `Ping`, `Select`, `Insert`, `Replace`, `Delete`, `Update`, `Upsert`, `Call`, `Call16`, `Call17`, `Eval`, `Execute` of a `Connector` and `Pooler` return response data instead of an actual responses (#237). `pool.Connect`, `pool.ConnetcWithOpts` and `pool.Add` use a new type `pool.Instance` to determinate connection options (#356). `pool.Connect`, `pool.ConnectWithOpts` and `pool.Add` add connections to the pool even it is unable to connect to it (#372). Required Go version from `1.13` to `1.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). `Schema` field from the `Connection` struct is removed (#7). `OkCode` and `PushCode` constants is 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_data` in `crud.Error` (#330). Support `fetch_latest_metadata` option for crud requests with metadata (#335). Support `noreturn` option for data change crud requests (#335). Support `crud.schema` request (#336, #351). Support `IPROTO_WATCH_ONCE` request type for Tarantool version >= 3.0.0-alpha1 (#337). Support `yield_every` option for crud select requests (#350). Support `IPROTO_FEATURE_SPACE_AND_INDEX_NAMES` for Tarantool version >= 3.0.0-alpha1 (#338). It allows to use space and index names in requests instead of their IDs. `GetSchema` function to get the actual schema (#7). Support connection via an existing socket fd (#321). `Header` struct for the response header (#237). It can be accessed via `Header()` method of the `Response` interface. `Response` method added to the `Request` interface (#237). New `LogAppendPushFailed` connection log constant (#237). It is logged when connection fails to append a push response. `ErrorNo` constant that indicates that no error has occurred while getting the response (#237). `AuthDialer` type for creating a dialer with authentication (#301). `ProtocolDialer` type for creating a dialer with `ProtocolInfo` receiving and check (#301). `GreetingDialer` type for creating a dialer, that fills `Greeting` of a connection (#301). New method `Pool.DoInstance` to execute a request on a target instance in a pool (#376). Bugfixes Race condition at roundRobinStrategy.GetNextConnection() (#309). Incorrect decoding of an MP_DECIMAL when the `scale` value is negative (#314). Incorrect options (`after`, `batch_size` and `force_map_call`) setup for crud.SelectRequest (#320). Incorrect options (`vshard_router`, `fields`, `bucket_id`, `mode`, `prefer_replica`, `balance`) setup for crud.GetRequest (#335). Splice update operation accepts 3 arguments instead of 5 (#348). Unable to use a slice of custom types as a slice of tuples or objects for `crud.*ManyRequest/crud.*ObjectManyRequest` (#365). Testing More linters on CI (#310). Added an ability to mock connections for tests (#237). Added new types `MockDoer`, `MockRequest` to `test_helpers`. Fixed flaky decimal/TestSelect (#300). Fixed tests with crud 1.4.0 (#336). Fixed tests with case sensitive SQL (#341). Renamed `StrangerResponse` to `MockResponse` (#237). Other All Connection.<Request>, Connection.<Request>Typed and Connection.<Request>Async methods are now deprecated. Instead you should use requests objects + Connection.Do() (#241). All ConnectionPool.<Request>, ConnectionPool.<Request>Typed and ConnectionPool.<Request>Async methods are now deprecated. Instead you should use requests objects + ConnectionPool.Do() (#241). box.session.push() usage is deprecated: Future.AppendPush() and Future.GetIterator() methods, ResponseIterator and TimeoutResponseIterator types (#324). 1. https://github.com/tarantool/go-tlsdialer 2. https://github.com/tarantool/go-tarantool/blob/master/MIGRATION.md
oleg-jukovec
added a commit
that referenced
this pull request
Feb 12, 2024
Overview There are a lot of changes in the new major version. The main ones: * The `go_tarantool_call_17` build tag is no longer needed, since by default the `CallRequest` is `Call17Request`. * The `go_tarantool_msgpack_v5` build tag is no longer needed, since only the `msgpack/v5` library is used. * The `go_tarantool_ssl_disable` build tag is no longer needed, since the connector is no longer depends on `OpenSSL` by default. You could use the external library go-tlsdialer[1] to create a connection with the `ssl` transport. * Required Go version is `1.20` now. * The `Connect` function became more flexible. It now allows to create a connection with cancellation and a custom `Dialer` implementation. * It is required to use `Request` implementation types with the `Connection.Do` method instead of `Connection.<Request>` methods. * The `connection_pool` package renamed to `pool`. See the migration guide[2] 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.Connect` no 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.Connect` and `pool.Add` now accept context as the first argument, which user may cancel in process. If `pool.Connect` is canceled in progress, an error will be returned. All created connections will be closed. `iproto.Feature` type now used instead of `ProtocolFeature` (#337). `iproto.IPROTO_FEATURE_` constants now used instead of local `Feature` constants for `protocol` (#337). Change `crud` operations `Timeout` option type to `crud.OptFloat64` instead of `crud.OptUint` (#342). Change all `Upsert` and `Update` requests to accept `*tarantool.Operations` as `ops` parameters instead of `interface{}` (#348). Change `OverrideSchema(*Schema)` to `SetSchema(Schema)` (#7). Change values, stored by pointers in the `Schema`, `Space`, `Index` structs, to be stored by their values (#7). Make `Dialer` mandatory for creation a single connection (#321). Remove `Connection.RemoteAddr()`, `Connection.LocalAddr()`. Add `Addr()` function instead (#321). Remove `Connection.ClientProtocolInfo`, `Connection.ServerProtocolInfo`. Add `ProtocolInfo()` function instead, which returns the server protocol info (#321). `NewWatcher` checks the actual features of the server, rather than relying on the features provided by the user during connection creation (#321). `pool.NewWatcher` does not create watchers for connections that do not support it (#321). Rename `pool.GetPoolInfo` to `pool.GetInfo`. Change return type to `map[string]ConnectionInfo` (#321). `Response` is now an interface (#237). All responses are now implementations of the `Response` interface (#237). `SelectResponse`, `ExecuteResponse`, `PrepareResponse`, `PushResponse` are 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 a `PushResponse`. `PushCode` constant is removed. Method `Get` for `Future` now returns response data (#237). To get the actual response new `GetResponse` method has been added. Methods `AppendPush` and `SetResponse` accept response `Header` and data as their arguments. `Future` constructors now accept `Request` as their argument (#237). Operations `Ping`, `Select`, `Insert`, `Replace`, `Delete`, `Update`, `Upsert`, `Call`, `Call16`, `Call17`, `Eval`, `Execute` of a `Connector` and `Pooler` return response data instead of an actual responses (#237). `pool.Connect`, `pool.ConnetcWithOpts` and `pool.Add` use a new type `pool.Instance` to determinate connection options (#356). `pool.Connect`, `pool.ConnectWithOpts` and `pool.Add` add connections to the pool even it is unable to connect to it (#372). Required Go version from `1.13` to `1.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). `Schema` field from the `Connection` struct is removed (#7). `OkCode` and `PushCode` constants is 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_data` in `crud.Error` (#330). Support `fetch_latest_metadata` option for crud requests with metadata (#335). Support `noreturn` option for data change crud requests (#335). Support `crud.schema` request (#336, #351). Support `IPROTO_WATCH_ONCE` request type for Tarantool version >= 3.0.0-alpha1 (#337). Support `yield_every` option for crud select requests (#350). Support `IPROTO_FEATURE_SPACE_AND_INDEX_NAMES` for Tarantool version >= 3.0.0-alpha1 (#338). It allows to use space and index names in requests instead of their IDs. `GetSchema` function to get the actual schema (#7). Support connection via an existing socket fd (#321). `Header` struct for the response header (#237). It can be accessed via `Header()` method of the `Response` interface. `Response` method added to the `Request` interface (#237). New `LogAppendPushFailed` connection log constant (#237). It is logged when connection fails to append a push response. `ErrorNo` constant that indicates that no error has occurred while getting the response (#237). `AuthDialer` type for creating a dialer with authentication (#301). `ProtocolDialer` type for creating a dialer with `ProtocolInfo` receiving and check (#301). `GreetingDialer` type for creating a dialer, that fills `Greeting` of a connection (#301). New method `Pool.DoInstance` to execute a request on a target instance in a pool (#376). Bugfixes Race condition at roundRobinStrategy.GetNextConnection() (#309). Incorrect decoding of an MP_DECIMAL when the `scale` value is negative (#314). Incorrect options (`after`, `batch_size` and `force_map_call`) setup for crud.SelectRequest (#320). Incorrect options (`vshard_router`, `fields`, `bucket_id`, `mode`, `prefer_replica`, `balance`) setup for crud.GetRequest (#335). Splice update operation accepts 3 arguments instead of 5 (#348). Unable to use a slice of custom types as a slice of tuples or objects for `crud.*ManyRequest/crud.*ObjectManyRequest` (#365). Testing More linters on CI (#310). Added an ability to mock connections for tests (#237). Added new types `MockDoer`, `MockRequest` to `test_helpers`. Fixed flaky decimal/TestSelect (#300). Fixed tests with crud 1.4.0 (#336). Fixed tests with case sensitive SQL (#341). Renamed `StrangerResponse` to `MockResponse` (#237). Other All Connection.<Request>, Connection.<Request>Typed and Connection.<Request>Async methods are now deprecated. Instead you should use requests objects + Connection.Do() (#241). All ConnectionPool.<Request>, ConnectionPool.<Request>Typed and ConnectionPool.<Request>Async methods are now deprecated. Instead you should use requests objects + ConnectionPool.Do() (#241). box.session.push() usage is deprecated: Future.AppendPush() and Future.GetIterator() methods, ResponseIterator and TimeoutResponseIterator types (#324). 1. https://github.com/tarantool/go-tlsdialer 2. https://github.com/tarantool/go-tarantool/blob/master/MIGRATION.md
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.
This PR introduces missing crud module options and a couple of bugfixes/doc improvements that was discovered while solving the original issue.
I didn't forget about (remove if it is not applicable):