Add priority-aware host reclamation transport - #29
Merged
Conversation
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.
Adds the first slice-6 lifecycle unit for the experimental Harper-backed Tantivy directory in
Implement Harper-backed Tantivy Directory mapping and atomic publication.
This remains test-only and does not expose the Harper storage backend in the release artifact.
Architecture
the foreground callback channel while allowing at most one cleanup operation in flight.
capacity is unavailable, while permanent configuration/request-size errors are classified before
transient occupancy.
KvDirectoryfrom the foreground store, namespace, andReclaimBudgetinone operation. This preserves the exact storage identity and reader-pin state and prevents request
bounds from being paired with a different namespace.
admission and response timeouts remain distinct.
Closingas normal shutdown and fails the transport closed for other callback-queueinconsistencies.
For the human reviewer
Two deliberate contracts remain for the later production lifecycle unit:
p99 gate and moves cleanup to a separate callback channel if bounded work cannot remain within it.
max_operationsis sized as configured foreground concurrency plus one cleanup slot. The transportenforces one cleanup operation; demand beyond the configured foreground concurrency waits normally.
The dedicated cleanup task will bind and own its
ReclaimBudget, expose health, and prevent use ofnon-reclamation directory methods. Those concerns are intentionally outside this test-only transport
slice and must be complete before Harper enables the backend.
Verification
npm run check: formatting and TypeScript checks passed; Clippy passed with warnings denied; 108Rust tests, 42 active Node/native tests, and the packed consumer artifact test passed. Three existing
opt-in rocksdb-js lease tests remained skipped because no feature-enabled checkout was configured.
npm run benchmark:smoke: passed against the unchanged public mmap backend (1,000 documents; warmapproximate p99 0.229 ms in this run).
sizing, physical deletion of both retired payloads, close wake-up, worker teardown, and conservative
timeout accounting.
error classification, request-bound enforcement, namespace binding, shutdown taxonomy, and test
overclaims. Both final convergence reviews found no material remaining defect; one Gemini diff-only
clamp finding was rejected because the shared helper already applies the same clamp.
Complexity: complicated
Comment generated by kAIle (GPT-5)
Review-Coverage: authored=unknown; ran=none; rounds=1 @ f161f5e
Human-Review-Need: 4 @ f161f5e