Update C++ core and assert the service set a bucket ping reports - #251
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The assertions accurately cover both timing-dependent default behavior and deterministic service filtering.
Pull request overview
Updates diagnostics tests for bucket pings that may include cluster-level services.
Changes:
- Requires default bucket pings to include key/value.
- Adds deterministic coverage for key/value-only bucket pings.
File summaries
| File | Description |
|---|---|
test/diagnostics_test.rb |
Adjusts bucket ping assertions and adds a scoped ping test. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
DemetrisChr
requested changes
Sep 9, 2026
avsej
force-pushed
the
fix-mock-diagnostics-tests
branch
from
September 9, 2026 15:41
5a479e4 to
135a255
Compare
Motivation ---------- The ping collector completed as soon as the number of in-flight pings reached zero, which it can do while the fan-out is still being dispatched. The cluster-level services are pinged from the node list in the configuration the session manager holds, so a ping issued before that configuration arrives registers no reporter for them and completes on the key/value reporters alone. Bucket#ping therefore reported key/value by itself or every service the topology advertises, depending on which won that race. Modifications ------------- The core moves to efc5278, which holds a dispatch scope open across the whole ping fan-out (CXXCBC-1022) so the collector cannot complete while endpoints are still being handed reporters. The range also carries per-thread allocation counting and the migration of the core unit tests onto their new framework. Results ------- Bucket#ping and Cluster#ping report every service the topology advertises, regardless of when they are issued relative to the configuration arriving. test_bucket_ping asserts that a bucket ping reports key/value and nothing else, which stopped being the contract in CXXCBC-845, so that test now fails on every run rather than only when the race goes against it.
Motivation ---------- test_bucket_ping asserts that a bucket ping reports key/value and nothing else. CXXCBC-845, which added wait_until_ready, also made a bucket-scoped ping cover the cluster-level HTTP services, so the assertion describes a contract the core no longer has and fails on every run. Nothing covered the bucket-scoped path for any service other than key/value. Modifications ------------- The default bucket ping is asserted to report key/value and to cover the same services as a cluster ping, which states the current contract without naming the services a particular cluster happens to deploy. The single-service case takes its service list from the cluster's own ping rather than a fixed one, so it exercises the bucket-scoped filtering for every service the cluster under test deploys, and requires key/value among them so that an empty list cannot satisfy it. Results ------- The comparison against a cluster ping distinguishes the fixed core from the broken one: against a core without CXXCBC-1022 a bucket ping that runs before the configuration reaches the session manager reports key/value alone and the comparison fails.
avsej
force-pushed
the
fix-mock-diagnostics-tests
branch
from
September 9, 2026 15:58
135a255 to
19874b3
Compare
DemetrisChr
approved these changes
Sep 9, 2026
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.
Motivation
test_bucket_ping asserts that a bucket ping reports key/value and
nothing else. CXXCBC-845, which added wait_until_ready, also made a
bucket-scoped ping cover the cluster-level HTTP services, so the
assertion describes a contract the core no longer has and every mock
job fails on it.
The reported set was not stable either. The ping collector completed as
soon as the number of in-flight pings reached zero, which it can do
while the fan-out is still being dispatched, and the cluster-level
services are pinged from the node list in the configuration the session
manager holds. A ping issued before that configuration arrives
registers no reporter for those services and completes on the key/value
reporters alone; one issued afterwards reports every service the
topology advertises.
Modifications
The core moves to efc5278,
which holds a dispatch scope open across the whole ping fan-out
(CXXCBC-1022) so the collector cannot complete while endpoints are
still being handed reporters.
The default bucket ping is then asserted to report key/value and to
cover the same services as a cluster ping, which states the current
contract without naming the services a particular cluster happens to
deploy. The single-service case takes its service list from the
cluster's own ping rather than a fixed one, so it exercises the
bucket-scoped filtering for every service the cluster under test
deploys, and requires key/value among them so that an empty list cannot
satisfy it.
Results
A bucket ping reports every service the topology advertises, regardless
of when it is issued relative to the configuration arriving. The
comparison against a cluster ping distinguishes the fixed core from the
broken one: against a core without CXXCBC-1022 a bucket ping that runs
before the configuration reaches the session manager reports key/value
alone and the comparison fails.