chore(qwp): quiet only test-only drainer setup-failure log noise#51
Open
bluestreak01 wants to merge 1 commit into
Open
chore(qwp): quiet only test-only drainer setup-failure log noise#51bluestreak01 wants to merge 1 commit into
bluestreak01 wants to merge 1 commit into
Conversation
BackgroundDrainer.run() logged every setup failure at ERROR with a full stack trace. The @testonly no-arg drainer constructs with a null slot and zero segment size, so it fails fast by design as soon as it runs; BackgroundDrainerPoolListenerTest and BackgroundDrainerPoolRaceTest each emit a burst of these stack traces that floods the test console. Keep ERROR for real orphan slots. In production a drainer always carries a non-null slot path from OrphanScanner, and a setup failure there means unacked data buffered on disk could not be drained to the server -- a durability concern operators must see. Demoting that to DEBUG would hide a real signal, so only the synthetic null-slot test path is quieted to DEBUG, guarded by isDebugEnabled() so SLF4J allocates no varargs array and formats no message when DEBUG is off. The failure stays observable regardless of log level: run() still drops the .failed sentinel via OrphanScanner.markFailed(), sets the FAILED outcome (counted by the pool), and records lastErrorMessage.
12c4a10 to
3c2b151
Compare
Contributor
[PR Coverage check]😍 pass : 3 / 4 (75.00%) file detail
|
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
BackgroundDrainer.run()logged every setup failure atERRORwith a fullstack trace. The
@TestOnlyno-arg drainer constructs with anullslot andzero segment size, so it fails fast by design as soon as it runs. Tests that
exercise the pool through that constructor —
BackgroundDrainerPoolListenerTestand
BackgroundDrainerPoolRaceTest— each emit a burst of these stack traces(
drainer setup failed for slot null: segmentSizeBytes too small: 0), whichfloods the test console with noise unrelated to any real problem.
Change
Discriminate on the slot path in the catch-all:
slotPath != null) keepsERROR. In production a draineralways carries a non-null slot path from
OrphanScanner, and a setup failurethere means unacked data buffered on disk could not be drained to the server —
a durability signal operators must see. This path is unchanged.
slotPath == null) drops toDEBUG, guarded byif (LOG.isDebugEnabled())so SLF4J allocates no varargs array and formats nomessage when
DEBUGis off.An earlier revision of this PR demoted the whole catch-all to
DEBUG. That waswrong: it would have hidden genuine production drain failures, not just test
noise. This revision keeps the production signal intact and quiets only the
test-only path.
Test plan
mvn -pl core compilepasses.BackgroundDrainerPoolListenerTestandBackgroundDrainerPoolRaceTeststillpass; they assert on drainer/pool state, not on log output.
log level.
ERROR.