chore(aerospike): switch to BSV fork of aerospike-client-go v8#970
Conversation
The BSV fork of aerospike-client-go-v8 is published at github.com/bsv-blockchain/aerospike-client-go/v8 — adds TeranodeModifyOp / TeranodeReadOp wire opcodes 200/201 alongside the upstream API. This commit is the dep-source swap only: a mechanical rename of all github.com/aerospike/aerospike-client-go/v8 imports to github.com/bsv-blockchain/aerospike-client-go/v8 across 61 files, drops the broken local-filesystem replace directive that pinned the build to v8.2.0, and pins the new dep to the tagged v8.7.1-bsv3 release at github.com/bsv-blockchain/aerospike-client-go on the v8 branch. The new wire opcodes are not exercised anywhere in this repo yet — without the native-op call sites (which land in a follow-up PR), the binary behaves identically to one built against upstream v8.7.x. The fork is a strict superset of upstream and falls back to standard BatchUDF / Execute paths on any cluster running stock Aerospike. Drops onsi/ginkgo and onsi/gomega from the indirect set; they were only being pulled transitively by upstream's test suite. Effective version moves v8.2.0 (the prior replace) -> v8.7.1; the bsv3 tag is bsv/v8 tip + 7 commits past v8.7.1-bsv2.
|
🤖 Claude Code Review Status: Complete No issues found. Summary: This PR successfully swaps the Aerospike Go client from upstream to the BSV fork (v8.7.1-bsv3). The changes are purely mechanical:
The BSV fork adds new opcodes (TeranodeModifyOp/TeranodeReadOp) but they are not referenced in this PR, so behavior is unchanged as stated. |
There was a problem hiding this comment.
Pull request overview
Mechanical swap of the Aerospike Go client dependency from upstream github.com/aerospike/aerospike-client-go/v8 to the BSV fork github.com/bsv-blockchain/aerospike-client-go/v8 pinned at tag v8.7.1-bsv3. Also drops a stale local-filesystem replace directive that had been pinning the linker to v8.2.0 while go.mod advertised v8.7.0. No call-site behavior changes — the new TeranodeModifyOp/TeranodeReadOp opcodes added in the fork are not referenced here (they land in PR #828).
Changes:
- Rename
aerospike/aerospike-client-go/v8→bsv-blockchain/aerospike-client-go/v8across 55+.gofiles (import paths only). - Replace
go.modreplacedirective with a directrequireon the BSV fork atv8.7.1-bsv3; updatego.sum; drop now-unusedonsi/ginkgoandonsi/gomegaindirect deps. - Upstream
aerospike-client-go/v8 v8.7.0is retained ingo.modas an indirect dep (still pulled in transitively).
Reviewed changes
Copilot reviewed 62 out of 63 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Drops the local replace to v8.2.0; adds direct require on BSV fork v8.7.1-bsv3 with explanatory comment; keeps upstream as indirect; removes ginkgo/gomega indirects |
| go.sum | Adds checksums for BSV fork; bumps upstream v8.2.0 line to v8.7.0 |
| stores/utxo/aerospike/*.go (and tests) | Import path swap to BSV fork across all aerospike store files |
| stores/utxo/aerospike/pruner/*.go | Import path swap in pruner package |
| util/aerospike*.go, util/uaerospike/*.go | Import path swap in shared aerospike helpers and mocks |
| services/asset/httpimpl/GetTxMetaByTXID*.go | Import path swap in asset HTTP handler and tests |
| cmd/monitor/monitor.go, cmd/aerospikereader/aerospike_reader.go | Import path swap in CLI tools |
| test/**/*.go | Import path swap in e2e, sequential, longtest, container helpers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Benchmark Comparison ReportBaseline: Current: Summary
All benchmark results (sec/op)
Threshold: >10% with p < 0.05 | Generated: 2026-05-28 13:01 UTC |
testcontainers-aerospike-go v0.4.0 switches its internal aerospike client import to the BSV fork (github.com/bsv-blockchain/aerospike-client-go/v8). Bumping picks up that change and lets go mod tidy fully drop the upstream github.com/aerospike/aerospike-client-go/v8 indirect that was left behind in the previous commit — the test binary no longer carries two copies of the aerospike client. Also drops the explanatory comment block above the bsv-blockchain/aerospike-client-go/v8 require line; the module name + this branch history are sufficient context.
stores/utxo/aerospike/circuit_breaker.go and circuit_breaker_test.go landed on main (PR bsv-blockchain#957) after this branch forked, and the subsequent merge brought them in with the upstream aerospike-client-go/v8 import path. Apply the same rename to keep the module-path swap consistent.
|
oskarszoon
left a comment
There was a problem hiding this comment.
LGTM — approve. Clean dep swap, fork delta touches zero wire/crypto/TLS/retry/connection-lifecycle code, full upstream test suite runs in fork CI, teranode tests 615/615 pass.
One thing worth fixing now or quickly after:
util/aerospike.go:466 calls client.EnableMetrics(nil) after WarmUp. The bsv3 patch flipped Cluster.metricsEnabled from atomic.Bool to a plain bool for hot-path perf, racy-by-design under the fork's "enable metrics only at construction" contract. Today's call site does it after WarmUp spins up background cluster-maintenance goroutines that read the bool — flags under -race. Mechanical fix: pass MetricsPolicy via ClientPolicy.MetricsPolicy at client construction, before WarmUp. Removes the race window and the documented-but-unenforced ordering dependency.
Non-blocking follow-ups (fork-side, worth tracking before PR #828's TeranodeModifyOp call sites land):
- The fork has no documented rollback path —
replacedirective is gone, so once consumer code addsTeranodeModifyOpcalls, falling back to upstream is impossible. Worth a short note in the fork's README. - Fork-PR #2 (metrics hot-path) landed without human review by stacking onto PR #1's branch. Worth pinning down the fork's review policy in CODEOWNERS / SECURITY.md.
- Tag
v8.7.1-bsv3is based on upstreamv8.7.0(no upstreamv8.7.1exists). Misleading; considerv8.7.0-bsv3for the next tag. - All
bsv*tags are unsigned. Sign future tags.
Squash-merge recommended — intermediate commit eb76e8359 briefly links both clients in the test binary; squashing keeps the swap atomic.



Summary
Swaps the aerospike Go client from upstream
github.com/aerospike/aerospike-client-go/v8to the BSV fork atgithub.com/bsv-blockchain/aerospike-client-go/v8, pinned to the freshly taggedv8.7.1-bsv3..gofiles — same import surface, different module path.replacedirective that pinned the actual build tov8.2.0whilego.modadvertisedv8.7.0.v8.7.1-bsv3(tag atbsv/v8tip, 7 commits pastv8.7.1-bsv2— adds theTeranodeModifyOp/TeranodeReadOpwire opcodes, packer pool perf, and metrics hot-path perf).go mod tidyalso drops two newly-unused indirect deps (onsi/ginkgo,onsi/gomega).Why this PR exists separately
This is the dep-source swap only. PR #828 ("aerospike: optional native operate-path for mod-teranode UDFs") originally bundled this swap with the call-site cutovers that actually exercise the new opcodes. Landing the swap on its own lets reviewers sign off on the dep change in isolation and shrinks PR #828's diff.
After this lands on
main, PR #828 can rebase and drop its82a0ff89(import switch),71a724ee(fork bump), andb765470d(fork bump) commits as already-applied.Behaviour impact
None on its own. The BSV fork is a strict superset of upstream v8.7.1. The new opcodes
TeranodeModifyOp/TeranodeReadOp(200/201) are not referenced anywhere in this repo after this PR — without thenative_op.goscaffolding (which lands in PR #828), every call site continues to use the existingNewBatchUDF/client.Executepaths.Effective upstream version:
v8.2.0(the priorreplace) →v8.7.1(BSV fork base). Therequirealready declaredv8.7.0, so the package code was already source-compatible withv8.7.x— thereplaceonly changed what the linker actually pulled in.Test plan
go build ./...— cleango vet ./...— clean (4 pre-existing warnings intest/utils/{helper,transaction_helper}.goreproduce onmain)staticcheckon aerospike-touching packages — cleangolangci-linton aerospike-touching packages — only 2 pre-existing prealloc nags in files this PR doesn't touchgo test ./stores/utxo/aerospike/... ./util/uaerospike/... ./util/...— passgo test -race ./stores/utxo/aerospike/... ./util/uaerospike/...— passgo test ./...— aerospike packages pass; unrelated failures (TestMinedThenSpendAllPrunes_SQLite/Postgresinstores/utxo/sql, chaos suite needingtoxiproxy, flakyTestKafkaConsumerMessageHandling) reproduce onmain