Aerospike Go client version 5.0.0 was released on May 11, 2021.
This is a major feature release. It is also a major breaking release. We have adopted Go’s module system as recommended by the Go authors, so the new release moves the active branch to v5 . As such, the import path changes to github.com/aerospike/aerospike-client-go/v5. The master branch remains in place to allow maintenance for the older v4 classic version until most users get the chance to upgrade.
This release also changes the way errors work in the client, and invalidates the old way. This allows the client to support Go’s somewhat new errors.Is and errors.As API, and properly chain errors together.
Also note that the Go Client now requires Aerospike Server version 4.9+ and will not work properly with older versions.
Breaking Changes
- Limits keys to
int,stringand[]bytetypes. The oldListValuearrays as types are not supported anymore. - Remove TLS code support for golang v1.8 and before.
- Moves
AerospikeErrorfrom/typesto the root of the package, and removes all other error type likeNodeError. - [CLIENT-1526] - Removes
Policy.Priority,ScanPolicy.ScanPercentandScanPolicy.FailOnClusterChange. - Removes
Recordset.Read()and avoids multiplexing ofRecordschannel inRecordset.Results(), and unexports theErrorchannel. - Remove legacy client code for old servers. Go client now requires server version 4.9+.
- Remove
Statement.PredExp, and only use thePolicy.PredExpto avoid confusion.PredExphas been deprecated and replaced byExpression. - Renames type
FilterExpressiontoExpression. -
Client.GetBatchXXX()will returnErrFilteredOutif an expression is passed to the API and some records were filtered out, regardless ofBatchPolicy.AllowPartialResults. -
Client.CreateRole()now requires quota information in the param list. - Removed
Connection.Authenticate()API. - Renamed
GetOpForBin()toGetBinOp(). - Removed
ScanPolicy.ConcurrentNodes. Now only uses.MaxConcurrentNodesto avoid confusion. - Moves the
RequestInfo()underConnection.
New Features
- Adopts module system and changes the import paths to
github.com/aerospike/aerospike-client-go/v5. - [CLIENT-1476] - Support new expressions introduced in server version 5.6, including
ExpReadOpandExpWriteOp. - [CLIENT-1463] - Support boolean particle type and make it opt-in for reflection API via
UseNativeBoolTypeInReflection. - [CLIENT-1522] - Support user quotas and statistics.
- [CLIENT-1492] - Remove ability to use old authentication protocol. This works behind the scenes and doesn’t have any impact on user code.
- [CLIENT-1081] - Adds
Errorinterface, changes all API signature to returnError. - Exports
AdminCommandand itsQueryXXXAPI.
Improvements
- Implement
GomegaStringerinterface to prevent very long error messages in tests. - Adds
ResultCode.String().