review: claim-id index for claims and fork children; comment budget and log levels - #49
Merged
Merged
Conversation
… ask their node first Claim recorded only the name key, and Fork recorded nothing, while the e2b surface and the envd proxy resolve by claim id. So the first by-id call after every e2b create or fork swept the fleet's inventories and, before the node published, asked every node. Claim now also records the claim id, and Fork records each child by name and by claim id, as scaling-design.md's claim-time index already states.
Contributor
Author
|
Two-host hardware A/B, 2026-09-25. Master
The record build also carried the rest of the sandbox chain (41-sbx: 28/28 PASS) with no regression. Observation, not new with these PRs: (Edited: an earlier version of this comment said the master watch reported the paused claim. It reported the running one.) |
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.
Whole-repo review round after #46. It covers the ledger-due files; #48 is reviewed on its own branch.
Fix
a74ef7d: a claim and a fork child are indexed by claim id, so e2b lookups ask their node first.Before:
Claimrecorded only the name key andForkrecorded nothing. The e2b surface and the envd proxy resolve by claim id, so the first by-id call after every e2b create or fork swept the fleet's inventories. Before the node had published, it also asked every node.Now:
Claimalso records the claim id, andForkrecords each child by name and by claim id, asdocs/scaling-design.mdalready says the claim-time index does.Cost: one more index write per claim and two per fork child, each a map write under an uncontended mutex. No I/O is added, and the by-id lookup that follows no longer fans out.
Tests:
TestGetByClaimIDAsksTheClaimingNodeFirstTestAForkChildIsLookedUpOnItsNodeBoth fail without the fix.
Review
0ac84d9: a node whose inventory cannot be read is skipped. It now logs atWarn, the level of a degraded read, with the error in the message.Errorstays for failures.1d6c607: godoc and inline comments in:cmd/sandbox-apiserverexamples/lifecyclepkg/e2bcompatpkg/envdproxynow fit the one-line budget. Contract text that already lives in
docs/e2b-compat.mdanddocs/configuration.mdis dropped from the godoc; key scoping, for example, isdocs/e2b-compat.mdline 31.Numbers
Kept
asl's forwarder advisories forpkg/envdproxyare both kept:withTargetpairs withtargetFromand keeps the context key private.sandboxHostnames the SDK's host format and is the inverse ofrouteOf.Gates
All run with
GOWORK=off:make fmt-check: darwin and linux.make lint: 6 ×0 issues.on each GOOS.go test -race -count=1 ./...: 9 packages ok.asl ./...: darwin and linux. The only findings are the two kept advisories above.The branch and #48 merge without conflict in either order (
git merge-tree).Hardware verification
Pending: the two-host round runs the e2b and envd-proxy lanes on master + #48 + this branch.