Skip to content

Releases: aerospike/aerospike-client-go

Hotfix release

20 May 21:44
9d59955
Compare
Choose a tag to compare
  • Improvements

    • Add code coverage tests to the Github Actions workflow.
    • Call the CancelFunc for the context.WithTimeout per linter suggestions in grpc calls.
    • Minor clean up and remove dead code.
  • Fixes

    • [CLIENT-2943] Client.BatchGetOperate does not consider ops in single key transforms.
    • [CLIENT-2704] Client dev tests failing with new server map key restrictions.
    • Fix as_performance and app_engine build tags.

Major Feature Release

08 May 23:04
043b81d
Compare
Choose a tag to compare

This is a major feature release of the Go client and touches some of the fundamental aspects of the inner workings of it.
We suggest complete testing of your application before using it in production.

Warning

The ProxyClient in this version supports a feature in Aerospike Server v7.1 that breaks the Batch functionality in Aerospike Cloud as of the date of this release. If you are using that product, you need to use the Aerospike Go Client v7.1.0. We expect the issue to resolve in the near future.

  • New Features

    • [CLIENT-2238] Convert batch calls with just one key per node in sub-batches to batch requests.
      If the number keys for a sub-batch to a node is equal to 1, the client will use a direct operation command instead of batch commands to reduce the load on the server.

    • [CLIENT-2274] Use constant sized connection buffers and resize the connection buffers over time.

      The client would use a single buffer on the connection and would grow it
      per demand in case it needed a bigger buffer, but would not shrink it.
      This helped with avoiding using buffer pools and the associated
      synchronization, but resulted in excessive memory use in case there were a
      few large records in the results, even if they were infrequent.
      This changeset does the following:
      1. Will use a memory pool for large records only. Large records
      are defined as records bigger than aerospike.PoolCutOffBufferSize.
      This is a tiered pool with different buffer sizes. The pool
      uses sync.Pool under the cover, releasing unused buffers back to the
      runtime.
      2. By using bigger aerospike.DefaultBufferSize values, the user can
      imitate the old behavior, so no memory pool is used most of the time.
      3. Setting aerospike.MinBufferSize will prevent the pool using buffer sizes too small,
      having to grow them frequently.
      4. Buffers are resized every 5 seconds to the median size of buffers used over the previous period,
      within the above limits.

      This change should result in much lower memory use by the client.

    • [CLIENT-2702] Support Client Transaction Metrics. The native client can now track transaction latencies using histograms. Enable using the Client.EnableMetrics API.

  • Improvements

    • [CLIENT-2862] Use default batch policies when the record level batch policy is nil.
    • [CLIENT-2889] Increase grpc MaxRecvMsgSize to handle big records for the proxy client.
    • [CLIENT-2891] Export various batch operation struct fields. Resolves #247.
    • Remove dependency on xrand sub-package since the native API is fast enough.
    • Linter Clean up.
    • WritePolicy.SendKey documentation, thanks to Rishabh Sairawat
    • Replaced the deprecated ioutil.ReadFile with os.ReadFile. PR #430, thanks to Swarit Pandey
  • Fixes

    • [CLIENT-2905] Fix inconsistency of handling in-doubt flag in errors.
    • [CLIENT-2890] Support []MapPair return in reflection.
      This fix supports unmarshalling ordered maps into map[K]V and []MapPair in the structs.

Minor Security Fix

10 Apr 15:44
Compare
Choose a tag to compare

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.

Security Fix Release

10 Apr 15:37
Compare
Choose a tag to compare

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.
  • Improvements

    • Fixes a typo.

Major Feature Release

28 Mar 19:33
Compare
Choose a tag to compare
  • 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 closed
        • exceeded-max-retries: Number of transactions where exceeded maximum number of retries specified in the policy
        • exceeded-total-timeout: Number of transactions that exceeded the specified total timeout
        • total-nodes: Total number of nodes in the cluster
    • Export private fields in PartitionStatus and add Recordset.BVal.
  • Improvements

    • [CLIENT-2784] Do not use batch repeat flag on batch writes when policy.SendKey is set to true.
    • [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.
  • Fixes

    • [CLIENT-2811] RespondPerEachOp doesn't work for list operation. To allow backwards compatibility, this change will change the default value of RespondPerEachOp to true.
    • [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.

Minor Release

25 Jan 15:49
Compare
Choose a tag to compare
  • New Features

    • Add TaskId() to ExecuteTask.
    • [CLIENT-2721] Make PartitionFilter.Retry public.
  • 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.

Backport fix release

25 Jan 19:50
Compare
Choose a tag to compare
  • New Features

  • [CLIENT-2712] [CLIENT-2710] Support read replica policy in scan/query.
    This includes PREFER_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 than BatchDeletePolicy.
    • [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
  • Improvements

    • Format all the code in the repo

Major Feature Release

14 Dec 19:34
Compare
Choose a tag to compare

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 all uint64 values inside maps and lists into signed int64 values. This means a math.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 to uint64 via a sign switch.
    If you didn't use uint64 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 and HLL deserialization.
      The Go client would read GeoJSON and HLL values back as string 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 old string and []byte. You now need to cast these values to GeoJSONValue and HLLValue types respectively.

    • [CLIENT-2484] Add returnType to supported ExpMapRemoveBy* and ExpListRemoveBy* methods.

    • [CLIENT-2319] Revise BatchReadAPIs to accept BatchReadPolicy argument. NewBatchReadOps no longer takes binNames 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 with InfoPolicy in client.Truncate.

    • Remove the deprecated ClientPolicy.RackId. Use Policy.RackIds instead.

  • New Features

    • [CLIENT-2712] [CLIENT-2710] Support read replica policy in scan/query.
      This includes PREFER_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.
  • 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 than BatchDeletePolicy in BatchDelete.

Hotfix

01 Nov 19:36
Compare
Choose a tag to compare
  • 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.

Major Feature Release

23 Aug 16:51
Compare
Choose a tag to compare
  • New Features

    • Adds support for the Aerospike Proxy Server and DBaaS service.