diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index bb1436e4..843225c4 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -11,9 +11,7 @@ jobs:
strategy:
matrix:
go-version:
- - "1.20"
- - "1.21"
- - "1.22"
+ - "1.23"
steps:
- uses: actions/checkout@v3
- name: "Setup Go ${{ matrix.go-version }}"
@@ -43,10 +41,10 @@ jobs:
run: go run github.com/onsi/ginkgo/v2/ginkgo build -tags="as_performance" .
- name: Build for Google App Engine (unsafe package removed)
run: go run github.com/onsi/ginkgo/v2/ginkgo build -tags="app_engine" .
- - name: Build for DBAAS (proxy mode)
- run: go run github.com/onsi/ginkgo/v2/ginkgo build -tags="as_proxy" .
- name: Run the tests
run: go run github.com/onsi/ginkgo/v2/ginkgo -coverprofile=./cover_native.out -covermode=atomic -coverpkg=./... -race -keep-going -succinct -randomize-suites -skip="HyperLogLog"
+ - name: Download gocovmerge
+ run: go mod download github.com/wadey/gocovmerge
- name: Combine Cover Profiles
run: go run github.com/wadey/gocovmerge cover_*.out > cover_all.out
- name: Check Code Coverage
diff --git a/.testcoverage.yml b/.testcoverage.yml
index 5d2da411..0bfdc732 100644
--- a/.testcoverage.yml
+++ b/.testcoverage.yml
@@ -9,7 +9,7 @@ profile: cover_all.out
# (optional; but recommended to set)
# When specified reported file paths will not contain local prefix in the output
-local-prefix: "github.com/aerospike/aerospike-client-go/v7"
+local-prefix: "github.com/aerospike/aerospike-client-go/v8"
# Holds coverage thresholds percentages, values should be in range [0-100]
threshold:
@@ -55,11 +55,6 @@ exclude:
- record_exists_action.go
- replica_policy.go
- generics.go
- - proxy_auth_interceptor.go
- - proxy_client.go
- - proxy_client_reflect.go
- - proxy_query_partition_command.go
- - proxy_scan_command.go
- login_command.go
- types/histogram/histogram.go
- types/rand/xor_shift128.go
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 37cb70d4..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,75 +0,0 @@
-language: go
-os:
-- linux
-dist: xenial
-go:
-- "1.13"
-- "1.14"
-- "1.15"
-- "1.16"
-- tip
-matrix:
- allow_failures:
- - go: tip
-install:
-- ifconfig
-- if [ -d "$HOME/gopath/src/github.com/citrusleaf" ]; then mv $HOME/gopath/src/github.com/citrusleaf
- $HOME/gopath/src/github.com/aerospike; fi
-- export PATH=$PATH:$HOME/gopath/bin
-- go get github.com/onsi/ginkgo/ginkgo
-- go get github.com/onsi/gomega
-- go get .
-- if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover;
- fi
-- wget -O aerospike-server.tgz http://www.aerospike.com/download/server/latest/artifact/tgz
-- tar xvzf aerospike-server.tgz
-- cp -f .travis/aerospike.conf ./aerospike-server/share/etc
-- cd aerospike-server
-- mkdir instance1
-- mkdir instance2
-- ./bin/aerospike init --home instance1 --instance 1 --service-port 3000
-- ./bin/aerospike init --home instance2 --instance 2 --service-port 3010
-- cd instance1
-- sudo ./bin/aerospike start
-- ../../.travis/wait_for_node.sh var/log/aerospike.log
-- cd ../..
-- pwd
-script:
-- ginkgo -cover -race -r -keepGoing -succinct -randomizeSuites internal/lua
-- ginkgo -cover -race -r -keepGoing -succinct -randomizeSuites types
-- ginkgo -cover -race -r -keepGoing -succinct -randomizeSuites pkg
-#- find tools -name "*.go" -type f -print0 | xargs -0 -n1 go build
-- cd tools/benchmark | go build -o benchmark .
-- cd tools/asinfo | go build -o asinfo .
-- chmod +x asinfo
-- cd tools/cli | go build -o cli .
-- find examples -name "*.go" -type f -print0 | xargs -0 -n1 go build
-- ginkgo build -tags="as_performance" .
-- ginkgo build -tags="app_engine" .
-- ginkgo -race -keepGoing -succinct -randomizeSuites -slowSpecThreshold=15
-# - ginkgo -race -keepGoing -succinct -randomizeSuites -slowSpecThreshold=15 -- -use-replicas
-# - ginkgo -race -keepGoing -succinct -randomizeSuites -slowSpecThreshold=15 -tags="as_performance"
-# - ginkgo -race -keepGoing -succinct -randomizeSuites -slowSpecThreshold=15 -tags="app_engine"
-- cd aerospike-server/instance1
-- sudo ./bin/aerospike stop
-- cat /dev/null > var/log/aerospike.log
-- sudo ./bin/aerospike start
-- ../../.travis/wait_for_node.sh var/log/aerospike.log
-- cd ../instance2
-- sudo ./bin/aerospike start
-- ../../.travis/wait_for_node.sh var/log/aerospike.log
-- cd ../..
-- ginkgo -race -keepGoing -succinct -randomizeSuites -slowSpecThreshold=15
-# - ginkgo -race -keepGoing -succinct -randomizeSuites -slowSpecThreshold=15 -- -use-replicas
-# - ginkgo -race -keepGoing -succinct -randomizeSuites -slowSpecThreshold=15 -tags="as_performance"
-# - ginkgo -race -keepGoing -succinct -randomizeSuites -slowSpecThreshold=15 -tags="app_engine"
-- .travis/proxy_check.sh
-notifications:
- hipchat:
- rooms:
- secure: mGFpOr8JWxK0bYj6wK3ur5+qtsfK+Im1njfPgoQ2b/Sudlii/mr2QiHyQRHtstw7tr79nyoMYgQ1lc53pTxUNAVSI/PkTJTBaDE4ZkyUG5+UW8NgMsC6FYhRfgu0xq+SBNn5a6KbrL8puQq0FH6fjEDYC00QqmN5L/967WCxF8g=
- email:
- - qe-notices@aerospike.com
- - qe-notices-clients@aerospike.com
- slack:
- secure: FwRNnmQZLVD3ygwu66ujNTsy1rHKFAV01wZJCad+L0r5I54lxFWZxsO0JtRbhFyZ0yb4fhls4dPpczTqQrtlRgUzWW55u2i5T/bkTWxOik8QPJW35n9EvSOMYgiTQs1PQeSYwRmiqn0aDd8Fu1RAvB71nLKeyccYbVMHGyhpAq8=
diff --git a/.travis/aerospike.conf b/.travis/aerospike.conf
deleted file mode 100644
index f9483ad8..00000000
--- a/.travis/aerospike.conf
+++ /dev/null
@@ -1,60 +0,0 @@
-# Aerospike database configuration file.
-
-# This stanza must come first.
-service {
- user ${user}
- group ${group}
- run-as-daemon
- paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
- pidfile ${home}/var/run/aerospike.pid
-# transaction-queues 8
-# transaction-threads-per-queue 8
- proto-fd-max 10000
- work-directory ${home}/var
-}
-
-logging {
- # Log file must be an absolute path.
- file ${home}/var/log/aerospike.log {
- context any info
- }
-}
-
-mod-lua {
-# system-path ${home}/share/udf/lua
- user-path ${home}/var/udf/lua
-}
-
-network {
- service {
- address ${service_addr}
- port ${service_port}
-# reuse-address
-# network-interface-name venet0
- }
-
- heartbeat {
- mode multicast
- multicast-group ${multicast_addr}
- port ${multicast_port}
-
- interval 150
- timeout 10
- }
-
- fabric {
- port ${fabric_port}
- }
-
- info {
- port ${info_port}
- }
-}
-
-namespace test {
- replication-factor 1
- memory-size 1G
- default-ttl 30d # 30 days, use 0 to never expire/evict.
- storage-engine memory
- allow-ttl-without-nsup true
-}
diff --git a/.travis/proxy_check.sh b/.travis/proxy_check.sh
deleted file mode 100755
index 843745a4..00000000
--- a/.travis/proxy_check.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-./asinfo -p 3000 -v "namespace/test" | grep -q ";client_proxy_complete=0;"
-if [ $? -ne 0 ]
-then
- exit 1
-fi
-
-./asinfo -p 3010 -v "namespace/test" | grep -q ";client_proxy_complete=0;"
-if [ $? -ne 0 ]
-then
- exit 1
-fi
-
-exit 0
\ No newline at end of file
diff --git a/.travis/wait_for_node.sh b/.travis/wait_for_node.sh
deleted file mode 100755
index 71513c45..00000000
--- a/.travis/wait_for_node.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-################################################################################
-# Copyright 2013-2020 Aerospike, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-################################################################################
-
-LOG=$1
-if [ ! -f $LOG ]; then
- echo "A log file does not exist at $LOG"
- exit 1
-fi
-
-i=0
-while [ $i -le 12 ]
-do
- sleep 1
- grep -i "there will be cake" $LOG
- if [ $? == 0 ]; then
- exit 0
- else
- i=$(($i + 1))
- echo -n "."
- fi
-done
-echo "the cake is a lie!"
-tail -n 1000 $LOG
-exit 2
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d169431d..1f8011ce 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,14 @@
# Change History
-## December 12 2024: v7.8.0-beta.1
+## December 13 2024: v8.0.0-beta.1
- Major feature release.
+ Major breaking release. This release supports Multi-Record Transactions. Please note that this is a beta release and will be subject to breaking changes.
+
+- **Breaking Changes**
+ - This release removes the proxy client and associated mock interfaces from the codebase. Maintaining those interfaces was very hard due to multiple build flags which had their own set of of supported API. Since interfaces are implicit, doing that by the user is as easy, or potentially easier outside of the library.
+ - Operation used to return the result of multiple ops on a single bin wrapped in `[]any`. That would be confusing, since it was not clear if the result was the contents of the bin, or the results of multiple commands. In version 8, the client will wrap those results inside a `as.OpResults` instead of a `[]any`, removing the confusion.
+ - The client would automatically populate the `stackFrame` field for the `as.AerospikeError`. Since that was an expensive operation, the client now will consult the value of `StackTracesEnabled` variable before doing so. The default is set to `false` of course.
+ - The client now requires Go v1.23+. Needed to implement iterators later.
- **New Features**
- [CLIENT-3159] Support writing raw payload to the server.
@@ -14,6 +20,7 @@
- **Improvements**
- [CLIENT-3214] Support `-use-services-alternate` in test arguments.
+ - Renamed all `interface{}` to `any`.
## November 29 2024: v7.7.3
diff --git a/README.md b/README.md
index c6e6de09..d8802439 100644
--- a/README.md
+++ b/README.md
@@ -1,24 +1,24 @@
-# Aerospike Go Client v7
+# Aerospike Go Client v8
-[![Aerospike Client Go](https://goreportcard.com/badge/github.com/aerospike/aerospike-client-go/v7)](https://goreportcard.com/report/github.com/aerospike/aerospike-client-go/v7)
-[![Godoc](https://godoc.org/github.com/aerospike/aerospike-client-go/v7?status.svg)](https://pkg.go.dev/github.com/aerospike/aerospike-client-go/v7)
-[![Tests](https://github.com/aerospike/aerospike-client-go/actions/workflows/build.yml/badge.svg?branch=v7&event=push)](github.com/aerospike/aerospike-client-go/actions)
+[![Aerospike Client Go](https://goreportcard.com/badge/github.com/aerospike/aerospike-client-go/v8)](https://goreportcard.com/report/github.com/aerospike/aerospike-client-go/v8)
+[![Godoc](https://godoc.org/github.com/aerospike/aerospike-client-go/v8?status.svg)](https://pkg.go.dev/github.com/aerospike/aerospike-client-go/v8)
+[![Tests](https://github.com/aerospike/aerospike-client-go/actions/workflows/build.yml/badge.svg?branch=v8&event=push)](github.com/aerospike/aerospike-client-go/actions)
An Aerospike library for Go.
-This library is compatible with Go 1.20+ and supports the following operating systems: Linux, Mac OS X (Windows builds are possible, but untested).
+This library is compatible with Go 1.23+ and supports the following operating systems: Linux, Mac OS X (Windows builds are possible, but untested).
-Up-to-date documentation is available in the [![Godoc](https://godoc.org/github.com/aerospike/aerospike-client-go/v7?status.svg)](https://pkg.go.dev/github.com/aerospike/aerospike-client-go/v7).
+Up-to-date documentation is available in the [![Godoc](https://godoc.org/github.com/aerospike/aerospike-client-go/v8?status.svg)](https://pkg.go.dev/github.com/aerospike/aerospike-client-go/v8).
You can refer to the test files for idiomatic use cases.
Please refer to [`CHANGELOG.md`](CHANGELOG.md) for release notes, or if you encounter breaking changes.
-- [Aerospike Go Client v7](#aerospike-go-client-v7)
+- [Aerospike Go Client v8](#aerospike-go-client-v8)
- [Usage](#usage)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- - [Some Hints:](#some-hints)
+ - [Some Tips](#some-tips)
- [Performance Tweaking](#performance-tweaking)
- [Tests](#tests)
- [Examples](#examples)
@@ -27,7 +27,6 @@ Please refer to [`CHANGELOG.md`](CHANGELOG.md) for release notes, or if you enco
- [API Documentation](#api-documentation)
- [Google App Engine](#google-app-engine)
- [Reflection, and Object API](#reflection-and-object-api)
- - [Proxy Client / DBAAS](#proxy-client--dbaas)
- [License](#license)
## Usage
@@ -40,7 +39,7 @@ package main
import (
"fmt"
- aero "github.com/aerospike/aerospike-client-go/v7"
+ aero "github.com/aerospike/aerospike-client-go/v8"
)
// This is only for this example.
@@ -63,7 +62,7 @@ func main() {
bins := aero.BinMap{
"bin1": 42,
"bin2": "An elephant is a mouse with an operating system",
- "bin3": []interface{}{"Go", 2009},
+ "bin3": []any{"Go", 2009},
}
// write the bins
@@ -89,12 +88,11 @@ Details about the API are available in the [`docs`](docs) directory.
## Prerequisites
-[Go](http://golang.org) version v1.20+ is required.
+[Go](http://golang.org) version v1.23+ is required.
To install the latest stable version of Go, visit
[http://golang.org/dl/](http://golang.org/dl/)
-
Aerospike Go client implements the wire protocol, and does not depend on the C client.
It is goroutine friendly, and works asynchronously.
@@ -108,16 +106,14 @@ Supported operating systems:
## Installation
1. Install Go 1.21+ and setup your environment as [Documented](http://golang.org/doc/code.html#GOPATH) here.
-2. Get the client in your ```GOPATH``` : ```go get github.com/aerospike/aerospike-client-go/v7```
- - To update the client library: ```go get -u github.com/aerospike/aerospike-client-go/v7```
-
-Using [gopkg.in](https://gopkg.in/) is also supported: `go get -u gopkg.in/aerospike/aerospike-client-go.v7`
+2. Get the client in your ```GOPATH``` : ```go get github.com/aerospike/aerospike-client-go/v8```
+ - To update the client library: ```go get -u github.com/aerospike/aerospike-client-go/v8```
-### Some Hints:
+### Some Tips
- To run a go program directly: ```go run ```
- to build: ```go build -o