Repository navigation
backendcluster: leave metric ownership to Rust dataplane - #318
Merged
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.
What problem does this PR solve?
Issue Number: ref #223
Problem Summary:
When the Rust dataplane is enabled, the Go
BackendReaderstill starts and campaigns for the same per-clustermetric_readerowner key as the Rust collector. If the Go candidate has the lower create revision, it wins while advertising the Goapi.addr, whose listener has already been handed to Rust. The Rust collectors then remain followers and the elected CPU/memory history ages to zero after the retention window.What is changed and how it works:
Keep the Go cluster reader allocated so query registration, manager snapshots, and API reads remain safe, but start its collection/election lifecycle only when
rust-dataplane.enabledis false. Rust-dataplane mode therefore has one metric owner: the Rust collector on its dedicated owner endpoint. Go-dataplane behavior is unchanged.The tests pin both sides of the contract: Go mode still creates a
metric_readerowner, while Rust mode creates none from Go and still permits query registration and empty metric reads.Check List
Tests
go test ./pkg/manager/backendcluster38364092593completed terminal SUCCESS on diagnostic heada9a931488dcb5e9d99f2c67803f379df12838eb9; this PR's product commitedcc0fe158b1216e3048293ce51f6038cc040bc7is its ancestor and all later changes are integration-harness-only.api.addrcandidate was absent.Notable changes
Dataplane parity drift
Release note