GH-4594: document capacity-aware agent assignment - #4606
Merged
Merged
Conversation
A new section on docs/guide/durability/leadership-and-troubleshooting.md, next to Solo Mode, plus three compiling samples in DocumentationSamples. DRAFT PROSE -- written in Jeremy's voice per the standing docs preference, but the wording is his to review before this ships. Covers each of the ways the issue said you can get burned by this feature, updated for what actually shipped rather than what was true when #4594 was filed: - it is opt-in and provisions a load_factor column, so AutoCreate.None deployments migrate first - you must supply an INodeLoadMonitor; there is no default and startup refuses without one. Stated with the reason that makes it matter: a node advertising nothing reads as having UNLIMITED headroom, so a broken monitor makes that node the preferred target rather than making the feature inert - MemoryPressureLoadMonitor needs a real memory limit to exist, and returns null without one - the two thresholds and the 10 point band between them, with why one threshold would oscillate - how strictly the line is honored depends on the distribution path: hard in DistributeEvenly, a preference in the capability-aware paths, because an empty candidate set there is a shard database with nothing running against it - what "no node has headroom" looks like, and that it is a quiet symptom worth alerting on - every store advertises load as of GH-4593, and a store that cannot warns at startup - where this is headed, so the knob does not read as a one-off Three bullets in the issue were obsolete by the time I wrote this and are NOT in the page: PostgreSQL-only (GH-4593), even-distribution-only (GH-4592), and the load monitor "likely to become required" (GH-4589 -- it is). Version badge is a guess at 6.40: the feature merged after the 6.39.1 bump. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VDUrBeB4tTnKj4AExCS1nj
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.
Closes #4594.
A new Capacity-Aware Agent Assignment section on
docs/guide/durability/leadership-and-troubleshooting.md, sitting right after Solo Mode, plus three compiling samples inDocumentationSamples.The prose is a draft for you to review
The issue said "Text should be in Jeremy's voice -- flagging this as an issue rather than drafting the prose." I took that as the docs-page case rather than the descriptive-text case and drafted it, calibrating against
cascading.md,middleware.mdanddurability/index.mdfirst. The wording is still yours to approve or rewrite -- I would rather you edit a draft than start from a blank page, but I am not assuming the register landed.Mechanically it follows the house style: second person, opens from the reader's problem,
--rather than em dashes (grepped, zero in the new section), asides in::: tip/::: warningcallouts rather than parentheticals, plain headings.Three of the issue's bullets were obsolete
The issue was filed before this week's follow-ups landed, so I wrote the page against what actually shipped rather than the bullet list:
The remaining bullets are all covered, and I leaned hardest on the one with the nastiest failure mode. The page does not just say "you must supply an
INodeLoadMonitor", it says why that is a startup exception instead of a fallback: a node advertising nothing is read by the leader as having unlimited headroom, so a broken monitor does not make the feature inert on that node, it makes that node the cluster's favourite place to put new work. That is the sentence I would least want a reader to miss.Also covered, because each is its own way to get burned: the
load_factormigration underAutoCreate.None;MemoryPressureLoadMonitorneeding a real memory limit to exist; the two thresholds and why one would oscillate; why the overload line is hard inDistributeEvenlybut only a preference in the capability-aware paths (an empty candidate set there is a shard database with nothing running against it, not an agent that waits); and that "nobody has headroom" is a quiet symptom worth alerting on.The issue also asked for the larger framing, so the section closes on where this is heading -- the cluster having an opinion about how much work a node takes being the foundation for having an opinion about how many nodes there should be -- hedged, so it does not read as a promise.
Samples
src/Samples/DocumentationSamples/CapacityAwareAssignment.cs, three snippets, all compiling: turning it on withMemoryPressureLoadMonitor, writing your ownINodeLoadMonitor, and wiring a custom one up. The custom-monitor sample carries the two warnings in its comments -- it runs on every heartbeat so it must not block, andnullmeans "no signal", not "lightly loaded".A note on the diff
mdsnippetsrewrites 89 docs files in this repo, not just the one you touched. This commit contains onlyleadership-and-troubleshooting.mdand the new sample file; the other 87 were reverted before committing.One thing to check
The version badge is a guess:
<Badge type="tip" text="6.40" />.Directory.Build.propsis on 6.39.1 and the feature merged after that bump, so 6.40 is my assumption rather than something I can verify.🤖 Generated with Claude Code
https://claude.ai/code/session_01VDUrBeB4tTnKj4AExCS1nj