~ knotless Search/
↑↓ move↵ open⇧↵ all results

zat.dev/zlay

atproto relay in zig · mirror of https://tangled.org/zat.dev/zlay

0
0
40 lines · 2.6 KB Raw History
# Stepped maintenance pilot

This isolated adapter uses the candidate core's `compactStep(64 << 10)` after
each changed commit when the load harness mode is `stepped`. `default` retains
synchronous compaction. Flush thresholds, durable commits, independent refreshed
readers, bounded request queues and reopen verification are unchanged. Collection
still runs on a triggered flush; its pause has not been made incremental.

The harness closes the write owner, records arrival-to-ack drain, then explicitly
flushes, completes compaction and collects. It reports that remaining work as
`maintenance_drain_ns` for both modes. It must not be omitted from remote capacity
comparisons. `compaction_steps` counts calls that advanced a job; `compactions`
continues to count complete synchronous jobs. Reader latency and acknowledgements
still include scheduled-arrival delay. All requested work is verified after reopen.

The new adapter regression returns with unfinished compaction and verifies every
acknowledged pair through its independent reader. The complete unit suite passed,
and the ReleaseSafe zio harness built. A bounded local network-free smoke used
4,096 seeded pairs, 1,000 arrivals/s for one second, 10% novel pairs, batch 16,
100 scans/s, queue 64, four zio executors, zero batching delay and an eight-segment
flush threshold. Both modes verified all 4,196 pairs with zero failed requests;
the stepped case advanced 21 steps and explicitly drained maintenance afterward.
The [CSV](zkv-load/stepped-smoke/results.csv) preserves the observations. This is
functional smoke coverage, not a performance or production-capacity conclusion.

Before remote qualification, build matched baseline/candidate frontend sources,
record hashes and binary/build costs, and compare scheduled-arrival tails, queues,
step/flush/collection pauses and total drain on a relay-sized dataset. Default
geometry consumer filesystem measurements and strict zeldi improvement remain
gates before retaining/promoting core changes. Production is untouched.

The harness also supports diagnostic `ZKV_PERF_CONTROL`/`ZKV_PERF_ACK` FIFO paths.
With a perf recorder initially disabled, it waits for acknowledgement after
sending enable immediately before scheduled arrivals and disable after all
requests drain. Seeding and final maintenance/reopen verification are excluded.
Ordinary runs leave both variables absent. Check the actual protocol and engine
oracle with `uv run --no-project python scripts/zkv/check_profile_control.py PATH_TO_NATIVE_INDEX_LOAD`;
this also verifies rejection of an invalid acknowledgement. The profile boundary
is benchmark-only and does not introduce engine instrumentation or production
telemetry.