Repository navigation
Make status telemetry available in simulation and fix schema coverage - #13847
tclinkenbeard-oai wants to merge 8 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Worker status stores locality names as flat JSON keys. Splitting a dotted key can omit matching storage workers from the capacity calculation. Skip absent and null labels explicitly, and preserve the error path for unexpected types.
tclinkenbeard-oai
left a comment
There was a problem hiding this comment.
Generated by Codex.
What problem is this PR trying to solve? (ELI10)
A simulated database could pass its status test with a blank spot where a storage worker’s memory reading belonged. The simulator supplied no reading, and the test checked only the fields it received. The list of allowed answers had also drifted. For example, status reports memory-radixtree for the engine used to replace storage workers, but the old list expected the spelling memory-radixtree-beta. Monitor in simulation, old engine list
How does this PR solve the problem? (ELI10 and review walkthrough)
The simulator gives workers repeatable sample readings. The test then asks the database for its usual status report and follows a memory reading back to the worker and machine it describes.
- The simulator binds the worker’s address before recording the readings. This matters because the cache stores and retrieves each reading by address. The reported memory limit comes from the same value passed to the worker. Worker startup, event cache
- The controller collects those readings and calculates the worker’s available memory from the machine’s free memory and the workers’ limits. It caps the result at the worker’s own limit. Event collection, memory calculation
- The two engine simulations require a storage worker with a reading in that range and a matching machine in the same reply. After an incomplete reply, the final check can retry for a bounded period. Expiry without a complete sample fails the test. Storage role, memory and machine checks, retry and failure
What is it trying to do?
Exercise the production status formatter in simulation, align the schema and documentation with the names that formatter emits, and preserve unset worker labels as JSON null. Engine names, updated engine list, locality serialization test
Is it correct?
Yes. The coverage filter skips exactly the scalar map markers for which the matcher cannot record a hit. Object maps and their fields remain covered. Every reply still goes through schema validation before the retry can finish. Coverage filter, matcher, reply validation
Are there bugs?
I found none in the revised code. In particular, when a worker has both zoneid and zoneid.group, the exclusion check now looks up the whole label literally. It skips missing and null values, counts matching workers toward the capacity check, and preserves the error path for an unexpected value type. Matcher and regression, exclusion decision, capacity guard
Are there omissions?
I found no blocking gaps. The remaining risk is timing under injected faults. The workload requires one complete sample from a storage worker and its machine within the retry window. That gives the test a concrete success condition even when earlier replies are partial.
Are there better ways of doing things?
Supplying the sample readings at worker startup keeps the controller’s formatting and memory calculations in the test path. I’d keep that boundary.
Should this CL be LGTMd?
Yes, LGTM. I traced the telemetry, schema validation, and locality exclusion paths at the published head. This was a static review with no builds or tests run during the review. GitHub had reported no check results for this head at review time.
Result of foundationdb-pr-clang-arm on Linux RHEL 9
|
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Result of foundationdb-pr on Linux RHEL 9
|
Result of foundationdb-pr-clang on Linux RHEL 9
|
Result of foundationdb-pr-macos on macOS
|
Result of foundationdb-pr-macos-m1 on macOS
|
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Summary
memory-radixtreeperpetual-wiggle engine while preserving legacy configuration-input aliases and supported process classes.ssd-1andmemory-radixtreestorage configurations while excluding only incompatible Attrition workloads.Validation
git diff --check origin/main...HEADclang-format-19 --dry-run --Werror fdbclient/Schemas.cpp fdbclient/include/fdbclient/JsonBuilder.h fdbserver/SimulatedCluster.cpp fdbserver/clustercontroller/Status.cpp fdbserver/workloads/StatusWorkload.cppfdbserver_clustercontroller_test -f /status/json/builderfdbserver -r unittests -f /fdbserver/status/schema/fdbserver -r simulation -f tests/fast/StatusStorageEngine.toml -s 12648430 -b off -fi offfdbserver -r simulation -f tests/fast/StatusPerpetualWiggleEngine.toml -s 12648430 -b off -fi offfdbserver -r simulation -f tests/fast/StatusDuringOutage.toml -s 12648430 -b off -fi offfdbserver -r simulation -f tests/fast/StatusStorageEngine.toml -s 12648430 -b on -fi onfdbserver -r simulation -f tests/fast/StatusPerpetualWiggleEngine.toml -s 12648430 -b on -fi on