Three harness comments described the behaviour this change replaced, which the
squash merge does not publish.
- run-full-validation.sh: the capture flag means CAPTURE_EXIT is not the only
record of capture health; and a gated capture failure is an infrastructure
error, stated without 'exactly as before'.
- tx_submitter.py: give the reason the first occurrence logs at WARNING (DEBUG
is off in CI) rather than what a failed run 'previously produced'.
- workload_orchestrator.py: a wedged process cannot stall the profile, rather
than 'can no longer'.
Comments only, no behaviour change.
Both sides added to the same guarded include block: this branch's
get-object metric names, and the tx-tracing header arriving from phase-3.
Kept both inside the one guard rather than taking a side.
Both sides added a guarded include block at the same point in
PeerImp.cpp: this branch's consensus receive-span header, and phase-3's
tx-tracing header. Kept both in one guard with a comment covering the two
reasons, rather than taking a side and dropping an include the file needs.
Without telemetry the counters hold no state, so AcquireStats is
trivially default constructible. MSVC then rejects a const instance left
to the compiler-generated constructor (C4269, fatal under -Werror), and
clang-tidy reports the same type as an uninitialized member elsewhere.
Braces settle both.
Fixed at the two owners rather than by giving Counter a written-out
constructor: an empty counter has no state to be indeterminate, so this
is about what the compilers report, not about wrong values, and making
Counter non-trivial would need a modernize-use-equals-default
suppression in a header eleven files include.
MSVC is not available here, so C4269 itself is unverified locally; both
files compile under gcc with and without telemetry at -Werror -Wall
-Wextra, and the clang-tidy member-init finding is confirmed gone.
TxTracing.h declares txReceiveSpan() and txProcessSpan(). Both call sites
sit inside an XRPL_ENABLE_TELEMETRY guard, so with telemetry off the header
is included but nothing from it is used, which clang-tidy reports as an
unused header. Guard the include the same way so it is still there for the
default build.
clang-tidy runs over the whole tree in the build without telemetry, and
reported nine findings that no other configuration can see.
Eight are headers left included after the only code using them is
compiled out: scope.h in the backend, and scope.h, Types.h, WriteStats.h,
cstdint, latch, optional and thread in the test. Each moves into a
guarded group instead of being deleted, since all are needed when
telemetry is on.
The ninth is acquireStats_. Its counters hold no state without telemetry,
which leaves AcquireStats trivially default constructible, so the member
needs an explicit initializer to avoid indeterminate values.
Verified per file in both configurations: each finding reproduced before
the change and is gone after it, and every file compiles with and without
telemetry under -Werror -Wall -Wextra.
The round and its two constants are reached only from the write-stats
tests, which are inside the telemetry guard. Left outside it, the round
is an unused function in a build without telemetry, and -Werror rejects
it on both gcc and clang.
Moves the guard boundary rather than annotating the round, so the build
without telemetry carries no dead code. Mirrors NuDBBackend::recordInsert
on the production side, which is guarded for the same reason.
startRoundTracing() is the only reader and writer of prevRoundSpanContext_,
and it is compiled out with telemetry, so a telemetry-off build sees an unused
private field and -Werror rejects it.
Marked rather than guarded: the two sibling span contexts are declared in both
configurations -- one of them escapes the warning only because an unguarded
accessor returns it -- and guarding this one alone would make the member set
depend on the build.
Every counter recordInsert() touches is declared only with telemetry compiled
in, and its one caller sits inside the same guard, but the method itself was
declared unconditionally. A telemetry-off build therefore failed to compile it:
concurrentWriters, insertCount, insertTotalUs and insertMaxUs are all
undeclared there.
Guard the method with the state it maintains.
pendingCount() returns std::size_t and nothing in this file included
<cstddef>, so misc-include-cleaner fails the build. The check only reports on
a pull request's changed files, so the omission went unseen until an unrelated
edit brought this file back into scope.
Two findings, both fatal under warnings-as-errors:
misc-const-correctness on the counter in counter_starts_at_zero, which only
ever reads it. Declare it const; the two counters that call add() stay
mutable.
readability-implicit-bool-conversion on the metrics-registry pointer in
setValidLedger's guarded block. Compare against nullptr explicitly.
A ledger reaches totalAgreements or totalMissed only when its event is
classified, which normally happens in reconcile() once the grace period has
elapsed. The insert-path bound erased the oldest entry outright, so an event
dropped before it was classified was counted as neither an agreement nor a
miss and both lifetime totals under-reported. MaxPendingEventsTrimming shows
it: 1100 recorded ledgers yielded 1000 agreements.
Move the classification into classifyPending() and call it from both places,
so a ledger reaches the totals exactly once whether reconcile() or the bound
resolves it. Add a test that records past the cap without reconciling and
asserts every evicted ledger still has a verdict -- the property the earlier
bound test missed, because it only checked the record-time counter.
Classifying on eviction fixes the verdict on whichever validations have
arrived, so one still in flight can no longer complete or repair it. That
only happens while over the bound, which means reconcile() is not running.
Conflicts in OTelCollector.h/.cpp: both sides correct the same wrong comments
about metric-name formatting, in different words. Kept this branch's wording,
which already covers every site -- verified no wrong claim survives and that
the two sides differ in comments only, with identical code.
The class documented a name format it does not produce. Eleven comments said
the [insight] prefix is prepended, and gave examples like "xrpld_rpc_size" and
"xrpld_LedgerMaster_Validated_Ledger_Age" that also kept the original casing.
formatName() lowercases the raw instrument name and maps dots and spaces to
underscores, and applies no prefix. All four instrument factories go through
it, so "RPC.Size" exports as "rpc_size". prefix_ is written in the constructor
and read in one place, the startup log line, so nothing it holds can reach an
exported name. The service is identified by the service.name resource
attribute.
Comments only, in both the header and the implementation. The ASCII diagram
still lists prefix_ as a member, which it is.
The overview diagram and the thread-safety note named Mirror<T>, which this
header does not declare. Drop both mentions so the file documents what it
ships.
onMessage(TMProposeSet) already owns a ScopedSpanGuard called span, the root
for the inbound peer message. The thread-free handle for the proposal receive
span was declared with the same name in the same scope, so the second
declaration conflicted with the first and every use of it -- the assignment,
the liveness test, the attribute writes and the job capture -- resolved
against the wrong type.
Call it proposalSpan. The validation handler already keeps its two apart the
same way, with valSpan for the root.