Compatibility and upgrades
From 1.0 a release only adds to what is listed here. A change that would break one of them waits for 2.0.
What 1.x promises
A 1.x release grows a surface: a new record kind in the file, a new route or optional field, a flag, a statement. It never changes or removes what was there. A feature is deprecated in a minor, kept for the rest of 1.x and removed only in 2.0. 0.x releases promise nothing.
| Surface | What holds | Checked by |
|---|---|---|
| The file | 1.x opens every file written from v0.2.0 on, and a file a 1.x wrote opens in every later 1.x, but for four values and types v0.2.0 took that no write makes any more (below). Record kinds 1 to 14 and type tags 0 to 18 keep their meaning; a new one takes the next number (File format). | Each release's own files -- a server's, a replica's, the shell's, a checkpoint's graphs, the files a crash leaves, scheduled statements of every timing with their last runs, a mirrored PostgreSQL table, sealed backups and its archives, sealed and plain, a tenant node's archive of every tenant, numbers below zero and past their type's range, indexes with every option set, a graph past 65 536 vectors, a field dropped and compacted away, a collection of more than 4 096 fields, written by that release's binaries, which are named by their checksums with the commit, compiler, cargo home and SDK that built them -- opened by every later build on Linux, macOS and Windows, every byte of each read by that release's own layout and every form its writers emit held in a file or named with why, held to their checksums and to the answers that release gave, its graphs restored rather than rebuilt, rows of every type written into them through every index, compacted and opened again; the server's file served by every later server, answering over HTTP as that release's did; archives restored to every moment that release's own restore was asked, saying what it said, its fennec verify lines alike; a page's stored data and a Durable Object's storage, written by that release's own web client and @fennecdb/cloudflare, restored and answering alike; the four exceptions (below) written by v0.2.0's shell and held in their own words; each set's checksums pinned in the tests, so a set written again fails, a form found missing later held by a further set of the same release written by binaries from its tag, and a release cannot be cut until every release before it has its set. A release candidate has no set: its files carry no promise. Fixture files of the language's features; the power-cut runs on Linux and Windows; two of the exceptions written by v0.2.0's own server in the weekly run below. |
| FennecQL | No text that parsed reads as another statement, and none a 1.x release read is refused by a later 1.x. A stored statement keeps its meaning, so the grammar epoch stays 4. | Every pull request: each text the repository and main hold, and a list of every kind of statement, read as main reads it; and the 8 845 texts of v0.2.0's corpus as v0.2.0's own parser read them, with each later release's corpus kept beside it (make fennecql-corpus). A statement a named statement may hold is compared by the digest a stored statement is held to; a schema change, a listing or a call by the tree it reads as, a field that holds nothing left out. Where that tree changes under a 1.x release's text, the change passes only with the grammar epoch raised -- a major version -- or with a written claim that the statement means what it meant, which the check prints for review. A text that was refused may come to be accepted. |
| HTTP API | It only grows: no route, parameter, field or status removed or narrowed. The OpenAPI document the server serves is held to it. | The same steps as make openapi-check, on every pull request. |
| C library | fennec.h's functions and FENNEC_* codes keep their prototypes and values. | The library's tests check the codes; make api-check holds every prototype and macro to a dump of the header, and from the 1.0 tag a break is a major version. |
| JavaScript types | fennec.d.ts and client.d.ts only gain declarations. | make types-check, the builder's and schema's golden files, and make api-check, which holds every export of both files to a dump of them, kept current and never smaller than the last release's: a removed export, a changed declaration or a dropped overload fails. |
| The SDKs | Python, JavaScript, Go, .NET, Swift, Kotlin and Dart keep the public names they ship at 1.0. | Each SDK's tests; a dump per language (each needs an outside tool, so they come after 1.0) and a run against servers of other versions are to come. |
| Sync | A replica of one release syncs with a server of another. | make sync-scenarios-check: both runners pass every scenario. |
| Sealed archives and backups | A file sealed with a key opens with that key in every later 1.x, those 0.2.0 sealed among them. A release from before files were bound to what they are refuses one sealed after, so upgrade every fennec that restores or verifies before any archiver (Sealed archives and backups). | An archive and a backup sealed by 0.2.0's code, opened by every build; a weekly run beside the last release's server and shell, whose fennec seals files this release opens and refuses the ones this release sealed in those words. |
| Replicas, archives and the router across releases | Every reader of a file or a stream — a replica, a standby, an archiver, a router, a node, the shell that verifies and restores — upgrades before any primary. One a release back beside a newer one works or stops in words, never reading wrong, naming the record kind, type tag or version where it names one. A newer one follows an older and reads what it wrote, but for the four exceptions. | A weekly run, and one on every release tag, of this release's server, shell and router beside the last release's server and shell and its router, built from its tag (no release publishes one yet): replication both ways, every record kind, type tag and statement record of the release written, archives and backups, a router over nodes of the other release, and a rolling upgrade of a router and a node pair under writes, every acknowledged write read back from both nodes. |
| Command line | A flag of fennec, fennec-server or fennec-shard is not removed, and a switch does not start taking a value or the reverse. An exit code keeps its meaning (Server lists the server's, the shell the shell's). | make api-check and each binary's tests, on every pull request: every command's flags, read off its --help and asked of the binary itself, and its exit codes with their meanings, held to a dump kept current and never smaller than the last release's. |
| Metrics | A metric of /_metrics, the server's or the router's, keeps its name, its type and its labels; new metrics and new labels are added beside them. | The same check: every metric a scrape shows, with its type and labels, held to a dump, and every metric name in the code held to be in it. |
| Release files | The names of the archives, zips, packages and checksums. | CI checks the tarballs' and the Windows zip's names through the installers' tests; the release workflow checks each file; the rest by hand. |
| Stored data in a page | What a page keeps in IndexedDB or OPFS restores in every later 1.x. | The browser tests, and each release's own IndexedDB records and OPFS file, a synced replica's state among them, written by its web client, restored by every later one and answering as that release did; real Chrome, Firefox and Safari runs are to come. |
What is not frozen
- The Rust crates' API. None is published; use fennecdb through the server, the shell, the C library or the browser module.
- The browser module's exports, which belong to
@fennecdb/weband ship with its glue. - How a page lays out its IndexedDB or OPFS data. Only that the data restores.
- The studio's pages and the desktop app (beta).
Changed on purpose since v0.2.0
0.x promises nothing, but these changes are ones a v0.2.0 user can meet as a break:
- Connecting to PostgreSQL (
fennec import, its--follow,fennec-server --follow). A host off this machine is spoken to undersslmode=verify-fullunless the connection string orPGSSLMODEnames a mode: a server whosesslis off, or a certificate signed by a CA the client does not trust, is refused, the error saying how to go on. Holding a password, the client signs in by SCRAM-SHA-256 alone unlessrequire_authsays otherwise, bound to TLS where the server offers it. A SCRAM iteration count under 4 096, a%not followed by two hex digits andconnect_timeout=0are refused (TLS, Signing in). - An
Idempotency-Keya server kept. Keys are kept in a new form, and those a v0.2.0 server or node kept are not looked up: a keyed write sent before the upgrade and again after it runs again, where v0.2.0 answered what it kept (Retrying a write). fennec_data_bytesis the live records. As its help and Monitoring say: up to v0.2.0 it counted the overwritten and deleted records too, so a graph of it drops after the upgrade, andfennec_dead_bytes / (fennec_data_bytes + fennec_dead_bytes)passes a half where it never could.fennec_reclaimable_bytesand the--auto-compacttrigger move a little too, a file an older build wrote counting its dead records' heads short until its next compact. The shell's.statssays the live and the dead bytes apart.
Upgrading
Upgrade every reader before any primary, and roll forward. For a cluster the order is archivers and the shells that restore, routers, nodes holding replicas or standbys, then primaries (Sharding reference).
- No release publishes the router,
fennec-shard, yet: upgrading a router means building it from the release's tag (cargo build --release --locked -p fennec-shard). - Routers go before nodes for a node that asks no data token too: such a
node refuses what a v0.2.0 router forwards it, even on loopback, unless it
runs
--insecure(A node with no token behind a router). - In a node pair, the standby's node goes first. Before the next node, wait
until the standby holds what the primary does: on the primary's node
/t/<tenant>/_replication/statuslists the standby withsentequal todurable, or the standby's own status says"connected": trueand"behind": 0(for a file's replica, the metricsfennec_replica_connected1 andfennec_replica_behind0). - Restarting the primary's node in place costs its tenants their writes for
the restart: the router answers each that it was not sent (503), safe to
send again. A router fails a node over only with
--auto-failover. - An
Idempotency-Keya v0.2.0 server or node kept is not looked up once it runs the new release: a keyed write sent before its upgrade and again after runs again. Let clients' retries of writes made before end first (Retrying a write). - A node holding both primaries and replicas cannot be upgraded before every primary: in such a fleet, use no feature that moves the format until every node runs the release.
- A newer replica follows an older primary, and one a release back beside a newer primary follows it or stops in words. Each release is run beside the last one's server and shell and its tag's router, weekly and at its tag, both ways.
- An older replica that meets a record kind or type tag it does not know
stops and names it, for example
record kind 13 is not a write. It never reads it as something else. Where the older release knew of no other version it cannot name it: v0.2.0's shell refuses a sealed file of the second version asnot a sealed file. - Such a record appears when a feature is first used, not when it is
installed: the first
create statement, a field with a second index. The release notes name each, so upgrade every reader first. - An older binary refuses a file a newer one has written to. Going back is safe only before a feature's first use.
Files from v0.2.0 that 1.x does not read whole
v0.2.0 took four kinds of value or type that no write makes any more. 1.x refuses them where it reads them, rather than read them with the unbounded recursion the limit of 64 levels closed:
- A
[[json]]field's row nested past 64 levels. The file opens and every other collection reads. Any statement that decodes that row fails whole witha value nests more than 64 levels deep;count, a read of another row by its id, and the fields stored before the deep one still answer. Adelor asetof the row is refused. Dropping the field is taken and helps only where no field is declared after it: a field after it, and adelof the row, are still refused in the same words, and so is an index over a later field. Backups and a replica's image carry the row unchanged; a replica holds it and refuses its reads alike. On 1.x alone the way out is, where the field is the collection's last, to drop it and delete the row; otherwise to read out the readable rows, drop the collection and make it again. - A type nested past 64 lists,
- a point's type under 64 lists, and
- a schema's number past its range (an HNSW
munder 2 or past 32 767, avector<N>or asparse<N>of 0 or past 109, a list of such vectors): the whole file is refused at the open, and only v0.2.0 can rewrite it.
Rewrite such values with v0.2.0 before upgrading.
The grammar epoch
A named statement is stored as its text with the grammar epoch it was parsed under. An open parses it again and, where the result differs, marks it broken until it is defined again. The epoch is 4, as it was in v0.2.0, and it stays 4 through 1.x. Raising it is a major version, and its notes name the stored statements it breaks.
Unicode
A text's case, a @text word and a name follow one Unicode
version, the one the release was built with: 18.0 today. A minor release may
move it, and its notes then name every letter whose upper(),
lower(), nocase fold or word-hood changed; a patch
release never does. No stored byte depends on it, so a file reads alike in
every release, and a letter stays a letter. The release that moved to 18.0
changed upper() of ɷ, ɼ, ꭋ and ꭌ, which now have capitals; the
rest of its change is letters Unicode 17.0 did not have.
During an upgrade two releases can answer those letters apart: a replica
and its primary, a router and its nodes, a page's module and the server. A
name using a letter newer than one side knows is refused there in words
(invalid collection name), never read as another name; the same
holds for an SDK's builder, which reads names by its own runtime's Unicode.
Support
The latest 1.x minor gets every fix. The previous minor gets security fixes
for six months after the next one is released. Release candidates are tagged
1.0.0-rc.N and published as pre-releases. A candidate's files carry
no promise: try a candidate on copies of your files. A change to the file
format between two candidates is named in the later candidate's notes, and
the release is what later builds are held to.
A patch to the previous minor, or a release candidate, is installed by
naming it: what takes "the newest" stays on the latest release. The install
script and GitHub's latest release, the image's latest tag,
npm's latest and the Homebrew formula keep the newest release;
on npm the previous minor's patches go out under release-1.N
(npm install @fennecdb/[email protected]) and the newest release
candidate under next, and every other registry takes the
version you ask for. Maven Central is the exception: while a candidate is
its highest version, Gradle's latest.release resolves to it, so
pin a version there.
Until 1.0.0 fennecdb is 0.x, an alpha: a security bug found in a 0.x release
gets no advisory and no patch release. The fix lands on main and
ships in the next release, so run the latest release. Report a vulnerability
privately, as SECURITY.md
says; a report is acknowledged within 3 working days.