Conversation
ajroetker
marked this pull request as ready for review
September 15, 2026 20:38
…gration # Conflicts: # zig/pkg/antfly/src/storage/db/db.zig
Contributor
Author
|
/ci run 9da8209 |
Contributor
Author
|
/ci run 5f84999 |
Separate bootstrap owner visits from typed merge visits and exercise a forced bootstrap split on both backends. Gate the fake embedding response until the cached reader is established instead of relying on rate-limit retry timing, and use a bounded visibility deadline with failure diagnostics.
Contributor
Author
|
/ci run 3f38836 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Existing standalone tables retain primary-LSM vector ownership after #728. This adds explicit, resumable offline and online migration to shared vector ownership while preserving artifact identities, models, configurations, and queries.
Online migration co-commits a candidate reference map with ordinary writes, validates its complete coverage, publishes a durable ownership decision, drains inline values without reappending payloads, consolidates ANN serving generations, and waits for bounded primary overlap rewrites to remove superseded inline values. The catalog and compiled storage owner reconcile interrupted publication. Updates, deletes, enrichment and old snapshots retain their normal version/lease protection; cancellation is limited to prepublication jobs.
antfly storage migrate --table NAME --to vector-store --job IDsupports online execution with--urland offline execution with--catalogplus--replica-root. The API creates jobs atPOST /tables/{table}/storage/migrations, observes them withGET /tables/{table}/storage/migrations/{job}, and advances/publishes/cancels them withPOSTon the job. GET never starts work or reconciles catalog publication. The standalone server and offline command are shipped in the same binary.The offline command streams the whole physical root into a resumable shadow, replays committed derived work, uses the same conversion/verification and native ANN lifecycle, and publishes through recoverable generation exchange. Standalone and the command share exclusive catalog admission. The offline candidate uses a bounded 64 MiB block cache under the normal memory budget when no caller cache is supplied. Descriptor-cache hits now avoid filename allocation; a repeated Debug microbenchmark measures 6.5× faster cached acquisitions, with no end-to-end speedup claim yet.
Scope is local, single-shard, single-replica standalone tables. Configuration/topology changes and overlapping backup/restore are fenced. Reverse conversion, HA, replication and broader backup support remain separate work. Operator instructions and recovery details are in
zig/VECTOR_STORE.md.Validation so far:
The final 1M fresh/online/offline screen completed with exactly 999,000 retained source payloads in every arm. Total allocated disk is 3.980/3.977/4.006 GB, with migrated primary SSTables down to 349/379 MB. Offline conversion plus churn fell from 29.9 to 8.85 minutes across the diagnostic screens, including explicit reclamation; online takes 7.49 minutes. Sampled peak RSS is 6.84/11.67/7.14 GiB. Reopened semantic QPS differs by up to about 6% online and 12% offline from fresh, and the offline arm has lower recall. These single sequential runs do not establish equivalent query quality or performance. Final 50K migration reclaims primary SSTables to 17–19 MB and total disk to within about 1% of fresh storage; all three arms retain the expected 49,000 live payloads. Online conversion plus churn takes 18.49 seconds (including primary reclamation), offline 11.52 seconds. The 50K screen exposed forced primary flushes after every page; pages now sync the WAL without forcing an SSTable, with publication retaining the full barrier. The first 1M online migration recovered correctly but retained old inline values below normal compaction thresholds; the new reclamation phase makes that work explicit and durable. Sustained queries cannot indefinitely defer this requested work.
Fresh and migrated 50K tables show a shared post-churn semantic-query slowdown, also measured after restart. A no-churn control retains high throughput after restart, so the follow-up target is deleted-identity lookup work, not migration alone. Results and limitations are recorded in
zig/VECTOR_STORAGE_MIGRATION_FINDINGS.md. No performance equivalence or migration-duration guarantee is claimed.The repository now requires a human
/ci run e26ab3a1dd7b28e1ede78c4a5b41f9551aba5ff4comment before starting CI for a PR revision. The two Linux unit step-count failures are fixed and pass locally; the final CI rerun awaits that approval.