Skip to content

Releases

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 07 Nov 23:04
aef9515

These notes describe fdb-go v0.2.0, following v0.1.0. v0.2.0 moves the Java target to Record Layer
4.14.2.0 and changes SQL storage, so read Upgrading from v0.1.0 before pointing it at existing
data. The full list is in the v0.2.0 changelog entry linked below; release gates are defined in RELEASE.md.

Upgrading from v0.1.0

  • SQL storage changed; nothing migrates automatically. The relational key space is Java's
    RelationalKeyspaceProvider layout byte for byte, so Go and Java open each other's databases and
    schemas, but SQL data written by v0.1.0 is not readable. Recreate it, or export and re-import it
    as described in docs/upgrade.md.
    For record stores used directly through the record layer, check the format-version rules in
    the same guide before opening v0.1.0 data.
  • A database path is /DOMAIN/DATABASE, as in Java. Register the domain once per process before
    use: sqldriver.RegisterDomainIfNotExists("FRL").
  • Restart paged queries. Do not resume a continuation minted by v0.1.0: many plans changed.
    v0.2.0 fixes empty suffixes when a cursor key equals its prefix (#868)
    and key-value cursor tokens on narrowed ranges now strip Java's range common
    prefix (#871). Tokens must be resumed with the original range; callers pass
    the continuation separately, not through EndpointTypeContinuation (now internal).
    Record scans and index scans (ordinary VALUE/VERSION, COUNT/SUM, MIN/MAX_EVER_TUPLE,
    MAX_EVER_VERSION and BITMAP_VALUE) return Java's last-key token and stop reason at an exact
    returned-row-limit boundary, followed by an empty page. SQL statement continuations remain
    engine-private; streaming-aggregate accumulator payloads and in-memory-sort state are not
    Java-compatible. Do not exchange these tokens between engines. A stale continuation is
    refused when the new plan's outermost cursor is an index or ranged scan,
    but, as in Java, it is not detected for an unfiltered primary scan or an in-join reading an
    in-union.
  • FDBDatabase.Run and its variants retry the way Java's transaction runner does: at most 10
    attempts by default (FDBDatabase.SetMaxAttempts). A body that commits the context it was handed
    is refused.
  • Index changes that need action: a collated index fails with GoOnlyCollationError unless the
    store opts into Go-only bytes (StoreBuilder.SetGoOnlyCollation(true)). VECTOR indexes read
    value column 0 as serialized vector bytes, need a dimension count and accept only Java's metric
    names. Rebuild Go-written TEXT indexes over Greek or supplementary-plane text.
  • Pure-Go client: GetRange issues its first batch at the call, captures the
    writes visible then, and commit waits for issued range reads (#873).
    API versions outside 510-730 are refused with 2203. SetLockAware and
    SetReadLockAware take no argument, and a read-lock-aware commit with writes fails with 2023
    unless the transaction is also lock-aware. SetSizeLimit and SetTimeout reject out-of-range
    values as libfdb_c does.
  • Typed record stores read and write only their record type's union field, and every save
    resolves the record type by the record's descriptor: load metadata with
    WithLocalFileDescriptor when saving compiled messages.
  • Record layer: a planned in-union takes its maximum from PlannerConfiguration.AttemptFailedInJoinAsUnionMaxSize,
    whose default is Java's 0, so it fails with "too many IN values" unless the caller raises it.
  • SQL and driver changes that can break callers: an unknown DSN parameter, or a DSN boolean other
    than true/false, is an error (22023); #
    no longer starts a comment; PLAN and DEEP are reserved words; a bound time.Time is a
    TIMESTAMP, and DATE and TIMESTAMP result columns scan as string.
  • Go API packages moved: pkg/recordlayer/indexpredicate, pkg/recordlayer/query/plan/plans
    and pkg/async/rtree follow Java's; the gomock mocks are in pkg/relational/api/apimock and the
    demo protos in fdb.dev/gen/demopb; the planner census is no longer public.
    keyspace.FDBResolver and recordlayer.FindRegisteredMessageType are removed.
  • CLI renamed: fdb replaces frl; Record Layer commands live under fdb rl.
    The CLI is the root module's cmd/fdb package; install it with
    go install fdb.dev/cmd/fdb@v0.2.0 or
    curl -fsSL https://fdb.dev/install.sh | sh -s -- --version v0.2.0. Replace any old
    tool dependency explicitly. Config/history use ~/.fdb and FDB_CONFIG; no old command alias,
    config lookup, or archive fallback is provided. See the CLI section of
    docs/upgrade.md.
    Historical nested-module tags are not retracted by this change.

What changed

  • Java Record Layer 4.14.2.0 is the target for wire format and SQL behaviour. Records Java writes
    through TransformedRecordSerializer (compressed, encrypted) are read and written, and HNSW graphs
    are written byte for byte as Java writes them for the same inserts and deletes. The remaining
    exceptions are listed in
    docs/compatibility.md.
  • SQL follows Java 4.14.2.0 where both engines run a query: EXISTS in boolean expressions,
    recursive CTE typing and naming, case-sensitive identifiers, LIKE, comments,
    COALESCE/GREATEST/LEAST, QUALIFY with aggregates, UPDATE/DELETE … RETURNING, error
    SQLSTATEs and texts. Known differences are in
    DIVERGENCES.md.
  • Driver parameters are bound as typed constants, not spliced into SQL text; named ?x/$x
    and IN ? are supported. The plan cache is shared by every database of a schema template.
  • The planner removes duplicate expressions from its memo and reuses immutable
    plans across bindings. No planning-latency measurement of this cut is asserted.
  • The pure-Go client behaves more like libfdb_c: commits have no synthetic 5 s reply
    timeout, and transaction timeout and Cancel end a commit's wait (#882); ENDPOINT_NOT_FOUND replies, futures that
    cancel, poll and share, tenant commits fenced in the tenant's keyspace, and a coordinator request
    that can no longer wedge a restarted coordinator. Option semantics are in
    pkg/fdbgo/fdb/OPTIONS.md.
  • Record layer: Java's AES transformations and JCEKS key stores, and every R-tree
    configuration Java accepts.
  • SQL driver limits: the DSN sets row, scan, memory and time limits, the transaction timeout and
    planner knobs. Prepared statements reuse plans across bindings.
  • New documentation: STATUS.md is
    the readiness statement; the
    compatibility and
    upgrading pages cover sharing
    data with Java and moving between versions.

Performance vs libfdb_c

R17 compared the frozen R16 NEW patchset, not current master or the v0.2.0
cut
, with FDB 7.3.77's native client through CGo. Ratios are geometric means of
160 within-block NEW/CGo ratios per workload, not ratios of displayed medians.
The five endpoints were pre-registered; both 99% moving-block bootstrap
intervals (L8 and L16, 100,000 draws each) had to have upper bounds below 1.

Measure Workload NEW / CGo L8 99% CI L16 99% CI
CPU/transaction, startup through shutdown (E−A) batchset50 0.862469 [0.850940, 0.874873] [0.850373, 0.875916]
CPU/transaction, measured window (C−B) batchset50 0.788291 [0.776788, 0.801047] [0.776380, 0.801644]
Mean latency read1000 0.625737 [0.603494, 0.650043] [0.600815, 0.652733]
p99 latency read1000 0.507259 [0.466695, 0.548761] [0.463166, 0.549550]
CPU/transaction, startup through shutdown (E−A) read1000 0.908661 [0.885677, 0.933150] [0.883870, 0.934491]
  • One previously used Hetzner ccx43 instance (16 vCPUs), reimaged with Ubuntu
    24.04 and a fresh FDB 7.3.77 cluster. No independent host/fleet replication.
  • 640 serial processes, one worker, GOMAXPROCS=8, Go 1.26.9, API 730.
    read1000: one Get/read-only transaction, 5,000 measured + 200 warmup;
    batchset50: 50 distinct 100-byte Sets/commit, 2,500 measured + 200 warmup.
  • E−A includes startup, fixture, warmup, validation, CSV, forced GC/finalizers
    and shutdown; it excludes preceding identity hashing, final JSON and process
    exit. It is not isolated steady-state CPU. Deferred cleanup can cross the
    C−B window boundaries. Go heap counters do not measure the native C++ heap.
  • NEW source: base 7922a2e5a8e3a2d6cf17dfee8b8134181c88b298 plus frozen patch
    SHA-256 d0a6ae57ac1143aa1247ce2461f84f74264825f901a53cb7ab943a0efe83be85;
    CGo source: 8ab5c5a4d6ee4858a4eacd6ac58e2a7be85dbead.
  • Results archive SHA-256
    4943768b532b2c57797c677f37b9381c10d922fbee81ef7821a3174a29d2e6f0.
    R17 tables are a formatting-only copy from the
    retained experiment; named raw artifacts remain in the retained archive, not
    at the tables URL. tools/clientbench (#822) is the
    harness; reproducing R17 requires its frozen sources, protocol and artifacts,
    not simply building current master.

The intervals depend on block-resampling assumptions on this one instance.
These results establish neither current-master performance nor general capacity,
universal Go-vs-C++ superiority, or source correctness.

Required versions: Java fdb-record-layer-core 4.14.2.0, FDB C++ client 7.3.77 (7.3 wire
protocol), Go 1.27.3 or newer (the minimum in go.mod).

Known gaps in this release, with workarounds, are listed in
[STATUS.md](https...

Read more

frl v0.1.0

Choose a tag to compare

@github-actions github-actions released this 26 Aug 13:04
e342883

Static, dependency-free binaries of the frl CLI (pure Go, no cgo; the
linux binaries run on glibc, musl, and FROM scratch).

Install

curl -fsSL https://fdb.dev/install.sh | sh

or with the Go toolchain (builds the identical version):

go install fdb.dev/cmd/frl@v0.1.0

Verify: every asset is sha256-listed in checksums.txt and carries
build provenance:

gh attestation verify frl_v0.1.0_linux_amd64.tar.gz -R birdayz/fdb-go