Releases: aerospike/aerospike-client-go
Minor Security Fix
This release updates the dependencies to mitigate security issues.
- Fixes
- [CLIENT-2869] Update modules. Fix Allocation of Resources Without Limits or Throttling for
golang.org/x/net/http2
.
- [CLIENT-2869] Update modules. Fix Allocation of Resources Without Limits or Throttling for
Security Fix Release
This release updates the dependencies to mitigate security issues.
-
Fixes
- [CLIENT-2869] Update modules. Fix Allocation of Resources Without Limits or Throttling for
golang.org/x/net/http2
.
- [CLIENT-2869] Update modules. Fix Allocation of Resources Without Limits or Throttling for
-
Improvements
- Fixes a typo.
Major Feature Release
-
New Features
- [CLIENT-2766] Support
RawBlobValue
in the Go client. - [CLIENT-2767] Support Persistent List Indexes.
- [CLIENT-2823] Support
QueryDuration
. - [CLIENT-2831] Support
ReadPolicy.ReadTouchTTLPercent
. - [CLIENT-2240] Add more client statistics.
- Adds the following statistics:
circuit-breaker-hits
: Number of times circuit breaker was hit.connections-error-other
: Connection errors other than timeouts.connections-error-timeout
: Connection Timeout errors.connections-idle-dropped
: The connection was idle and dropped.connections-pool-overflow
: The command offered the connection to the pool, but .the pool was full and the connection was closedexceeded-max-retries
: Number of transactions where exceeded maximum number of retries specified in the policyexceeded-total-timeout
: Number of transactions that exceeded the specified total timeouttotal-nodes
: Total number of nodes in the cluster
- Adds the following statistics:
- Export private fields in
PartitionStatus
and addRecordset.BVal
.
- [CLIENT-2766] Support
-
Improvements
- [CLIENT-2784] Do not use batch repeat flag on batch writes when
policy.SendKey
is set totrue
. - [CLIENT-2442] Document that Only
string
,integer
,bytes
are allowed as map key types;Policy.SendKey
clarification. - Reduce the required Go version to 1.20 to support EL9; Update the dependencies.
- Update
ExpCond()
doc to say that all action expressions must return the same type.
- [CLIENT-2784] Do not use batch repeat flag on batch writes when
-
Fixes
- [CLIENT-2811]
RespondPerEachOp
doesn't work for list operation. To allow backwards compatibility, this change will change the default value ofRespondPerEachOp
totrue
. - [CLIENT-2818] Fix return type for
ExpListRemoveByValueRange
. - Update the proto grpc files to resolve namespace issues.
- Improve the tests for
BatchOperations
to run on Github Actions. - Fix tests that relied on the server
nsup-period
setting to be larger than zero. - Fix Truncate test on slow servers.
- [CLIENT-2811]
Minor Release
-
New Features
- Add
TaskId()
toExecuteTask
. - [CLIENT-2721] Make
PartitionFilter.Retry
public.
- Add
-
Improvements
- Clean up documentation and remove dependency of examples to the v6 version of the client.
-
Fixes
- [CLIENT-2725]
QueryExecute
(background query) doesn't work without operations. - [CLIENT-2726] Proxy doesn't handle invalid filter expression error in query.
- [CLIENT-2727] Go proxy: Query Pagination never complete.
- [CLIENT-2728] Fix an issue where Bin names were ignored if a FilterExpression was passed to the Query.
- [CLIENT-2732] Go proxy: Not able to multiple query calls with the same statement.
- [CLIENT-2759] Go proxy: Background query with Expression doesn't filter records.
- [CLIENT-2725]
Backport fix release
-
New Features
-
[CLIENT-2712] [CLIENT-2710] Support read replica policy in scan/query.
This includesPREFER_RACK
which allows scan/query to be directed at local rack nodes when possible. -
Fixes
- [CLIENT-2759] Go proxy: Background query with Expression doesn't filter records
The filter expressions of wither policies will be used. Priority is with
the Query Policy for backwards compatibility. - [CLIENT-2616] Update more dependencies to the latest.
- [CLIENT-2618] Support persistent map indexes.
- [CLIENT-2726] Proxy doesn't handle invalid filter expression error in query.
- [CLIENT-2725] QueryExecute (background query) doesn't work without operations.
- [CLIENT-2727] Go proxy: Query Pagination never complete.
- [CLIENT-2732] Go proxy: Not able to multiple query calls with the same statement.
- [CLIENT-2728] Fix an issue where Bin names were ignored if a FilterExpression was passed to the Query.
- [CLIENT-2318] Expression in
BatchPolicy
takes precedence rather thanBatchDeletePolicy
. - [CLIENT-2434] Use 'sindex-exists' command in
DropIndexTask
. - [CLIENT-2694] Use RawURLEncoding instead of RawStdEncoding in proxy authenticator.
- Rename grpc proto definition files due to compiler limitations. Resolves #414
- [CLIENT-2759] Go proxy: Background query with Expression doesn't filter records
-
Improvements
- Format all the code in the repo
Major Feature Release
Caution
This is a breaking release. It is required to allow upgrading your programs to the Aerospike Server v7. This program upgrade process required as a prerequisite to upgrading your cluster, otherwise seemless cluster upgrade will not be possible. The changes and their rationale are documented in the following section.
-
Breaking Changes
-
[CLIENT-2713] Handle Normalized Integers in Maps and Lists.
Before Go client v7.0.0,uint64
types could be stored in lists and maps. To support all versions of the server consistently, the Go client will now behave like other Aerospike smart clients, and automatically convert alluint64
values inside maps and lists into signedint64
values. This means amath.MaxUint64
value in a List or Map will return as two's compliment: -1.
Example:client.Put(wpolicy, key, BinMap{"map": map[any]any{"max": uint64(math.MaxUint64), "typed": uint64(0)}})
will return as:
rec, err := client.Get(rpolicy, key) // rec.Bins will be: // BinMap{"map": map[any]any{"max": int64(-1), "typed": int64(0)}}
This will break all code that used to cast
rec.Bins["map"].(map[any]any)["max].(uin64)
. As a result, all such code should cast to int64 and then convert back touint64
via a sign switch.
If you didn't useuint64
values in Maps and Lists, you should not be affected by this change.
All the test cases that depended on the old behavior have been adapted to the new behavior.-
[CLIENT-2719] Typed
GeoJSON
andHLL
deserialization.
The Go client would read GeoJSON and HLL values back asstring
and[]byte
respectively. So if you read a record with bins of these types and wrote it directly back to the database, the type of these fields would be lost.
The new version addresses this issue, but could be a breaking change if you have code that casts the values to the oldstring
and[]byte
. You now need to cast these values toGeoJSONValue
andHLLValue
types respectively. -
[CLIENT-2484] Add
returnType
to supportedExpMapRemoveBy*
andExpListRemoveBy*
methods. -
[CLIENT-2319] Revise BatchReadAPIs to accept BatchReadPolicy argument.
NewBatchReadOps
no longer takesbinNames
and changes ops parameter to variadic for consistency.Changes the following Public API:
func NewBatchRead(key *Key, binNames []string) *BatchRead { func NewBatchReadOps(key *Key, binNames []string, ops []*Operation) *BatchRead { func NewBatchReadHeader(key *Key) *BatchRead {
to
func NewBatchRead(policy *BatchReadPolicy, key *Key, binNames []string) *BatchRead { func NewBatchReadOps(policy *BatchReadPolicy, key *Key, ops ...*Operation) *BatchRead { func NewBatchReadHeader(policy *BatchReadPolicy, key *Key) *BatchRead {
-
Replace
WritePolicy
withInfoPolicy
inclient.Truncate
. -
Remove the deprecated
ClientPolicy.RackId
. UsePolicy.RackIds
instead.
-
-
New Features
- [CLIENT-2712] [CLIENT-2710] Support read replica policy in scan/query.
This includesPREFER_RACK
which allows scan/query to be directed at local rack nodes when possible. - [CLIENT-2434] Use 'sindex-exists' command in
DropIndexTask
. - [CLIENT-2573] Support
ExpRecordSize()
. - [CLIENT-2588] SINDEX Support for 'Blob' Type Elements.
- [CLIENT-2712] [CLIENT-2710] Support read replica policy in scan/query.
-
Improvements
- [CLIENT-2694] Use RawURLEncoding instead of RawStdEncoding in proxy authenticator.
- [CLIENT-2616] Update dependencies to the latest, require Go 1.21
- Remove HyperLogLog tests from the Github Actions suite
- Remove Go v1.18-v1.20 from the Github Actions Matrix
- Rename grpc proto definition files due to compiler limitations. Resolves #414
-
Fixes
- [CLIENT-2318] Fixes an issue where Expression in
BatchPolicy
takes precedence rather thanBatchDeletePolicy
inBatchDelete
.
- [CLIENT-2318] Fixes an issue where Expression in
Hotfix
-
Fixes
- [CLIENT-2624]
BatchGetOperate
triggering SIGSEGV nil pointer in the Go client.
Caching of the operation is faulty and causes race conditions when used concurrently.
This commit removes the caching which included a useless allocation and rarely, if ever, had any practical influence on performance.
- [CLIENT-2624]
Major Feature Release
-
New Features
- Adds support for the Aerospike Proxy Server and DBaaS service.
Minor
-
New Features
- Add
ClientPolicy.SeedOnlyCluster
inClientPolicy
for using only seed nodes for connection. (Github #407) thanks to Sudhanshu Ranjan - [CLIENT-2307] Add
ExpInfinityValue()
andExpWildCardValue()
- Add
-
Improvements
- [CLIENT-2317] Better handle setting the
Error.InDoubt
flag in commands - [CLIENT-2379] Fix returning overall batch error
- Move particle type outside of internal and back to
types/
dir. - Updated dependencies to address security advisories.
- Improve tests in slow environments.
- Remove atomic integer operations, move to
Mutex
. - [CLIENT-2315] Use
BatchReadPolicy
inBatchRead
instead ofBatchPolicy
. - [CLIENT-2312] Remove support for old-style queries in very old server versions.
- [CLIENT-2265] Increase the required Go version to 1.17 to be able to compile a dependency which itself was updated due to security issues.
- [CLIENT-2317] Better handle setting the
-
Fixes
- Removes race condition from the client, resolves #399.
- [CLIENT-2339] Developer tests detecting race condition after updating query protocol.
- Assign
DefaultInfoPolicy
on Client initialization. - Fixed panics in Read Command Reflection API. (Github #402) thanks to Yegor Myskin
- [CLIENT-2283] Set correct return types in list/map read expressions.
- [CLIENT-2316], [CLIENT-2317]
BatchResult
Err
andResultCode
are not always set on errors, Incorrect in-doubt flag handling during batch operation.