Repository navigation
Extent maintenance: background merges and extent deletion (v0.1.0-preview.11) - #135
Conversation
Background merges (0158), the merge policy (0159), extent deletion by reader announcements (0160), the shared commit index (0161), and storage operations with the readers command (0162), filed unaccepted (ADR 0066). 0134, 0138 and 0139 amended by dated amendment. The storage format gains the commits blob in 7.5 and the reader record as its own format in 8; two problem types, reader-forgotten and read-unannounced-extent-gone. Refs #110 Signed-off-by: Emil Okkels Klein <hannibal.okkels@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BgePW3C3ECWERkiQMVdPb
The writer's maintenance merges extent sets by a size-tiered policy with a fan-out and a cap, writes the merged set, then swaps the catalog once under the fence, rebasing onto a catalog swapped meanwhile; a taken name takes the next sequence. The catalog version is the set sequence. Every instance on an object store announces the interval of versions it reads in readers/<id>, and the writer deletes a set only when no interval overlaps the versions that named it. Each set carries its commit index, so a cold start reads no log below the catalog. Uploads are staged through the cache and streamed in one create, and a merge past the store's single-upload limit is refused up front. The adapters raise ObjectStoreAccessDeniedException on 401 and 403. Refs #110 Signed-off-by: Emil Okkels Klein <hannibal.okkels@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BgePW3C3ECWERkiQMVdPb
varve storage prints the catalog's version, the sets per permutation, the unnamed sets the store keeps and the bytes each reader record retains; readers list and forget, guarded by the interval list showed. The read commands attach to an object store, announced or with --unannounced. /health/ready reports retention and never turns unready because of it. Varve:Store:ExtentMerges and Varve:ObjectStorage:ReaderId. Refs #110 Signed-off-by: Emil Okkels Klein <hannibal.okkels@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BgePW3C3ECWERkiQMVdPb
The checkpoint budget is replaced by the merge policy, its measured write amplification and the readers command; the follower's write access to readers/ for Azure and S3; the traceability record of #110. Refs #110 Signed-off-by: Emil Okkels Klein <hannibal.okkels@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BgePW3C3ECWERkiQMVdPb
The descriptor, the changelog's projection, README's status, the roadmap and AGENTS.md's state. Closes #110 Signed-off-by: Emil Okkels Klein <hannibal.okkels@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BgePW3C3ECWERkiQMVdPb
ADR 0159, the operator guide and the release notes carry the second REC M run, where the gate compares the largest set of each chain; the benchmarks README gains the milestone's tables beside #92's figures. Refs #110 Signed-off-by: Emil Okkels Klein <hannibal.okkels@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BgePW3C3ECWERkiQMVdPb
The ADRs and amendments, the departure from the plan, the gate's as-of reading for the maintainer, the properties with counts and durations, the defects they found, and the benchmarks. Refs #110 Signed-off-by: Emil Okkels Klein <hannibal.okkels@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BgePW3C3ECWERkiQMVdPb
ADR 0159 and the benchmarks README state the as-of read inside the largest set at REC M, 2,736 ms, growing with MaxSetBytes since narrowing is O(set size). ADR 0162 states that verify waits for #117 and multipart uploads stay a later decision. The record carries the approval, the release number rule and the reader contract with #105. Refs #110 Signed-off-by: Emil Okkels Klein <hannibal.okkels@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BgePW3C3ECWERkiQMVdPb
|
CI on b41564b is red only on Every failed job stops in its build step. The errors are the 16 citations of the not-yet-accepted decisions in The failed jobs are
Generated by Claude Code |
Accepts the decision sets of milestone Extent maintenance: background merges (0158), the merge policy (0159), extent deletion by reader announcements (0160), the shared commit index (0161) and storage operations (0162), with the amendment to 0134. Refs #110 Signed-off-by: Emil Okkels Klein <emil@okkels-klein.dk>
…ance SHACL took v0.1.0-preview.9, so this descriptor is renumbered to v0.1.0-preview.10 (ADR 0102). README's status, AGENTS.md's state, the ADR index and the benchmarks README keep both milestones, and the changelog is projected again. Refs #110 Signed-off-by: Emil Okkels Klein <hannibal.okkels@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BgePW3C3ECWERkiQMVdPb
Refs #110 Signed-off-by: Emil Okkels Klein <hannibal.okkels@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BgePW3C3ECWERkiQMVdPb
|
approve 7b40629 |
…tent maintenance #134 took v0.1.0-preview.10, so this descriptor is v0.1.0-preview.11 (ADR 0102). #134 landed first, so this merge wires its reader-contract hook (ADR 0164 point 6, amended): a follower announces the catalog version it opens through Dataset.OpenAsync, and the no-op Hold call is removed; its test now reads the follower's reader record. A writer and a follower of one dataset on one server keep separate reader records: with Varve:ObjectStorage:ReaderId set, the follower's is the id with -follower. Readiness carries the role and retention, not-ready its management, datasets and retention members, and the problem catalogue both milestones' types. The traceability record gains CI's store-step times. Refs #110 Signed-off-by: Emil Okkels Klein <hannibal.okkels@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BgePW3C3ECWERkiQMVdPb
#134 moved the checkpoint route to the management plane (ADR 0163). Refs #110 Signed-off-by: Emil Okkels Klein <hannibal.okkels@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BgePW3C3ECWERkiQMVdPb
…t maintenance Refs #110 Signed-off-by: Emil Okkels Klein <hannibal.okkels@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BgePW3C3ECWERkiQMVdPb
|
approve 0b02803 |
…art 2a #135 took preview.11, so this part's descriptor is renumbered to v0.1.0-preview.12 and the changelog re-projected. README Status names preview.12 first, with preview.11 and preview.10 behind it, and the image tags at preview.12; AGENTS.md's State keeps part 2a first, then Extent maintenance. The benchmarks README keeps #110's section before this part's, and states that #110's REC runs were taken on generator output version 1 too. Refs #138 Signed-off-by: Emil Okkels Klein <hannibal.okkels@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RFtkE4cRmAMRARHDu5Y9ZA
Milestone Extent maintenance, for #110. The descriptor proposes
v0.1.0-preview.11: SHACL (#123) took preview.9 and the Management plane (#134) preview.10, andmainis merged into this branch. ADRs 0158–0162, with dated amendments to 0134, 0138 and 0139, were accepted by the maintainer in 1dcbe2e; ADR 0164 gains a dated amendment for the wired hook. The record isdocs/traceability/2026-10-19-issue-110-extent-maintenance.md.What this changes, and why
Object storage landed extent sets without merges, so every read of the present merged one run per checkpoint, and read cost grew without bound.
FanOut(4) adjacent sets of similar size merge, and past the bound the smallest adjacent run merges.MaxSetBytes(256 MiB) caps a set. At the defaults a chain holds at most 15 sets below half the cap.DatasetOptions.ExtentMerges/Varve:Store:ExtentMerges.[oldest, newest]of catalog versions it holds inreaders/<id>, announcing then confirming.403on the record fails the open and names the role.--unannouncedreads without a record and fails a read of a gone extent withread-unannounced-extent-gone.reader-forgottenand reattaches.readers/(ADR 0134 amended; Azure ABAC and an S3 prefix policy in the operator guide).varve storage,varve storage readers listandforget --reader --oldest --newest, guarded by whatlistshowed./health/readyreportsretention, and never turns unready because of it.The reader contract with #105 is wired. #134 landed first, so this PR wires its hook (ADR 0164 point 6, amended 2026-10-20).
Dataset.OpenAsync, which announces the catalog version it loads in its reader record and confirms it.Holdcall is removed, and Management plane, part 1: the fleet system dataset, grants as code, varve apply (v0.1.0-preview.10) #134's test is nowa_follower_announces_the_catalog_version_it_opened.Varve:ObjectStorage:ReaderIdset, the follower's record is that id with-follower; the setting is now 1 to 119 characters.retentionreports those bytes.What was measured
All figures are from this session's Linux container. Azurite and RustFS ran on loopback.
REC M on files, one run (
--extent-maintenance M, fan-out 4, 256 MiB). The gate is relative within the run:MaxSetBytes, because narrowing is O(set size). O(matches) narrowing is a separate issue;MaxSetBytesis unchanged for it.First read below the catalog (
--objects, M):Tests on the rebased head (Linux):
Totals:
Varve.Store.Tests: 320, 303 passed, 17 skipped (the real Azure account and the deep fault exploration, both env-gated), 24 min 42 s.Varve.Server.Tests: 87 passed, 6 skipped (the identity providers), 11.7 s.Varve.Protocol.Tests: 108 passed, 30.6 s.Varve.Sparql.Store.Tests25,Varve.Protocol.Client.Tests117,Varve.Events.Tests64 andVarve.Sparql.Evaluation.Tests28, all passed.Iteration counts and durations:
VARVE_EXTENT_SCHEDULES), 0.9 s.VARVE_READER_SCHEDULES), 5.2 s. They include readers holding several versions at once and a superseded writer that keeps creating, checkpointing and merging, none of whose sets is ever named or fails the new writer. 1,200 ran clean on demand.VARVE_EXTENT_FAULTS_FULL=1for all), 37.7 s.Added time: the new store tests add about 70 s on Linux. CI's
Test Varve.Storestep, in minutes:mainat f7d25da (the base)Windows grew by about 7 minutes against
main, more than the Linux 70 s predicts; Linux is unchanged. Per-test attribution is CI: time limits, hang dumps and per-test durations for the store-test steps #126's: it adds a TRX upload for every test step, with each OS's twenty slowest tests in the job summary, and re-measures these tests once this has landed. For reference, CI: time limits, hang dumps and per-test durations for the store-test steps #126's figures are 8 min before Milestone Object storage: the log, the projection and the deployment in an object store #116, 29 min on Milestone Object storage: the log, the projection and the deployment in an object store #116's PR run and 53 min at its land.After merging Management plane, part 1: the fleet system dataset, grants as code, varve apply (v0.1.0-preview.10) #134 (Linux, this session):
Varve.Store.Tests316 passed, 17 skipped;Varve.Server.Tests110 passed, 6 skipped;Varve.Protocol.Tests113;Varve.Protocol.Client.Tests117. The Release build has 0 warnings and 0 errors.What was found
Fsets in one tier. The policy property found chains where nothing ever merged, with sizes alternating either side of a tier's edge. It became the similar-size rule plus a pressure rule (ADR 0159).IOException. It now tolerates the failure and retries next round.DefaultMaxSetBytesread as 0, because of static initialisation order.Datasets wrote oneMemoryStoragewhile background merges ran. Tests that open a second dataset now run with merges off.What is left
v0.1.0-preview.11, after Management plane, part 1: the fleet system dataset, grants as code, varve apply (v0.1.0-preview.10) #134's preview.10 (cut once ci(release): the gates job grants id-token: write, so v0.1.0-preview.10 can be cut #139 let the Release workflow start).varve storage verifywaits for Object store verification: varve storage verify, provider result records and a generated compatibility page #117. Multipart uploads stay a later decision. Both are stated in ADR 0162's consequences.Checklist
Refs #110; the descriptor commit carries the closing trailer (eng/issue-refs.cspasses).docs/spec/storage-format.md§7.5, §7.6 and §8.PublicAPI.Unshipped.txtinVarve.Store,.ObjectStorage,.Azure,.S3andVarve.Protocol. Nothing is removed from Shipped.OVERon the first run's mismatched comparison before it was made like for like (quoted in the record).eng/dco.cs.dotnet run eng/ci.cspasses locally: not run as a whole. Its jobs were run separately on the merged head: the Release build (0 warnings, 0 errors); the store, server, protocol and protocol client suites; and the licence-header, CI-image, DCO, issue-reference, decision-set, release and status checks.🤖 Generated with Claude Code
https://claude.ai/code/session_014BgePW3C3ECWERkiQMVdPb