Conversation
Replace the per-frame goroutine fan-out with a single ordered broadcast worker draining a bounded queue, so a remove can never overtake the lifecycle upsert it follows and resurrect a ghost workload on peers. Signed-off-by: mkalkere <14184493+mkalkere@users.noreply.github.com>
Split the dedup check from the record: a failed broker emit answers 500 without recording the key, so the peer retry is emitted instead of being swallowed as a duplicate. Applies to lifecycle upserts and removals. Signed-off-by: mkalkere <14184493+mkalkere@users.noreply.github.com>
Ordering diagrams for the serialized broadcast worker and the dedup-after-emit sequence, plus a reading-order entry in the README. Signed-off-by: mkalkere <14184493+mkalkere@users.noreply.github.com>
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.
Description
Fixes two reliability bugs in
services/nvpair-workload-managerthat could corrupt the scheduler's view of cluster load:removecould overtake its ownupserton a peer and resurrect a ghost workload -- phantom load in the scheduler. A single ordered worker (broadcastCh+broadcastLoop) now emits frames in order; a full queue drops with a warning and the heartbeat/backfill re-syncs.dedupIndex.seen()/add()are now split and the key is added only on success.Scope
Included:
services/nvpair-workload-manageronly,broadcast_order_test.go,dedup_after_emit_test.go, version bump,docs/workload-broadcast-reliability.mdx. Excluded: frozen-node handling (issue #6, separate discussion).Validation
go test -race ./...inservices/nvpair-workload-manager: pass.broadcast_order_test.go: 25 frames through the real cluster-mTLS broadcast path arrive in exact origin order.dedup_after_emit_test.go: failed lifecycle/remove emit returns 500 with no dedup recorded, retry emits exactly once, genuine duplicates still deduped.go vetclean,gofmtclean,node scripts/spdx-headers.mjsreports 0 missing headers on every branch.Risk
Checklist
git commit -s), certifying the Developer Certificate of Origin.services/versions.json, and described user-visible changes above so they reach the release notes.