Skip to content

Commit

Permalink
Upgrade To Version 8
Browse files Browse the repository at this point in the history
  • Loading branch information
khaf committed Dec 12, 2024
1 parent 9837cbb commit d085896
Show file tree
Hide file tree
Showing 204 changed files with 614 additions and 1,522 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down Expand Up @@ -43,8 +41,6 @@ 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: Combine Cover Profiles
Expand Down
7 changes: 1 addition & 6 deletions .testcoverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
75 changes: 0 additions & 75 deletions .travis.yml

This file was deleted.

60 changes: 0 additions & 60 deletions .travis/aerospike.conf

This file was deleted.

15 changes: 0 additions & 15 deletions .travis/proxy_check.sh

This file was deleted.

38 changes: 0 additions & 38 deletions .travis/wait_for_node.sh

This file was deleted.

11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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

Expand Down
41 changes: 16 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -89,12 +88,11 @@ Details about the API are available in the [`docs`](docs) directory.
<a name="Prerequisites"></a>
## 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.

Expand All @@ -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 <filename.go>```
- to build: ```go build -o <output> <filename.go>```
- example: ```go build -tags as_proxy -o benchmark tools/benchmark/benchmark.go```
- example: ```go build -tags as_performance -o benchmark tools/benchmark/benchmark.go```

<a name="Performance"></a>
## Performance Tweaking
Expand Down Expand Up @@ -160,7 +156,7 @@ See the [`tools/benchmark/README.md`](tools/benchmark/README.md) for details.
<a name="api-documentation"></a>
## API Documentation

A simple API documentation is available in the [`docs`](docs/README.md) directory. The latest up-to-date docs can be found in [![Godoc](https://godoc.org/github.com/aerospike/aerospike-client-go?status.svg)](https://pkg.go.dev/github.com/aerospike/aerospike-client-go/v7).
A simple API documentation is available in the [`docs`](docs/README.md) directory. The latest up-to-date docs can be found in [![Godoc](https://godoc.org/github.com/aerospike/aerospike-client-go?status.svg)](https://pkg.go.dev/github.com/aerospike/aerospike-client-go/v8).

<a name="google-app-engine"></a>
## Google App Engine
Expand All @@ -174,11 +170,6 @@ To build the library for App Engine, build it with the build tag `app_engine`. A
To make the library both flexible and fast, we had to integrate the reflection API (methods with `[Get/Put/...]Object` names) tightly in the library. In case you wanted to avoid mixing those API in your app inadvertently, you can use the build tag `as_performance` to remove those APIs from the build.


<a name="proxy-client--dbaas"></a>
## Proxy Client / DBAAS

To compile the client for the proxy server in our database-as-a-service (dbaas) environment, pass `-tags as_proxy` to the compiler on build.

<a name="license"></a>
## License

Expand Down
6 changes: 3 additions & 3 deletions admin_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"fmt"
"time"

"github.com/aerospike/aerospike-client-go/v7/pkg/bcrypt"
"github.com/aerospike/aerospike-client-go/v7/types"
Buffer "github.com/aerospike/aerospike-client-go/v7/utils/buffer"
"github.com/aerospike/aerospike-client-go/v8/pkg/bcrypt"
"github.com/aerospike/aerospike-client-go/v8/types"
Buffer "github.com/aerospike/aerospike-client-go/v8/utils/buffer"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion aerospike_bench_reflect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package aerospike_test
import (
"runtime"

as "github.com/aerospike/aerospike-client-go/v7"
as "github.com/aerospike/aerospike-client-go/v8"

"testing"
)
Expand Down
Loading

0 comments on commit d085896

Please sign in to comment.