[IMPORTANT NOTE] An authentication bug was introduced in Go client 5.0.0. As a result, the client may fail to refresh its session token after it expires, requiring the client to be restarted. If you are using password-based authentication, we highly recommend that you upgrade your client to version 5.6.0+, which you can do safely.
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 server version 4.9+ and will not work properly with older versions.
-
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
ExpReadOp
andExpWriteOp
. - [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
Error
interface, changes all API signature to returnError
. - Exports
AdminCommand
and itsQueryXXX
API.
- Adopts module system and changes the import paths to
-
Breaking Changes
- Limits keys to
int
,string
and[]byte
types. The oldListValue
arrays as types are not supported anymore. - Remove TLS code support for golang v1.8 and before.
- Moves
AerospikeError
from/types
to the root of the package, and removes all other error type likeNodeError
- [CLIENT-1526] Removes
Policy.Priority
,ScanPolicy.ScanPercent
andScanPolicy.FailOnClusterChange
- Removes
Recordset.Read()
and avoids multiplexing ofRecords
channel inRecordset.Results()
, and unexports theError
channel. - Remove legacy client code for old servers. Go client now requires server version 4.9+
- Remove
Statement.PredExp
, and only use thePolicy.PredExp
to avoid confusion.PredExp
has been deprecated and replaced byExpression
. - Renames type
FilterExpression
toExpression
. Client.GetBatchXXX()
will returnErrFilteredOut
if 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.MaxConcurrentNodes
to avoid confusion. - Moves the
RequestInfo()
underConnection
.
- Limits keys to
-
Improvements
- Implement
GomegaStringer
interface to prevent very long error messages in tests. - Adds
ResultCode.String()
.
- Implement