Skip to content

chore(qwp): quiet only test-only drainer setup-failure log noise#51

Open
bluestreak01 wants to merge 1 commit into
mainfrom
quiet-drainer-setup-failure-log
Open

chore(qwp): quiet only test-only drainer setup-failure log noise#51
bluestreak01 wants to merge 1 commit into
mainfrom
quiet-drainer-setup-failure-log

Conversation

@bluestreak01

@bluestreak01 bluestreak01 commented Jun 17, 2026

Copy link
Copy Markdown
Member

What

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. Tests that
exercise the pool through that constructor — BackgroundDrainerPoolListenerTest
and BackgroundDrainerPoolRaceTest — each emit a burst of these stack traces
(drainer setup failed for slot null: segmentSizeBytes too small: 0), which
floods the test console with noise unrelated to any real problem.

Change

Discriminate on the slot path in the catch-all:

  • Real orphan slot (slotPath != null) keeps ERROR. 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 signal operators must see. This path is unchanged.
  • Synthetic test path (slotPath == null) drops to DEBUG, guarded by
    if (LOG.isDebugEnabled()) so SLF4J allocates no varargs array and formats no
    message when DEBUG is off.

An earlier revision of this PR demoted the whole catch-all to DEBUG. That was
wrong: 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 compile passes.
  • BackgroundDrainerPoolListenerTest and BackgroundDrainerPoolRaceTest still
    pass; they assert on drainer/pool state, not on log output.
  • Those tests no longer print the setup-failure stack-trace burst at default
    log level.
  • Production behavior for real orphan slots is unchanged — failures still log at
    ERROR.

@bluestreak01 bluestreak01 added the enhancement New feature or request label Jun 17, 2026
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.
@bluestreak01 bluestreak01 force-pushed the quiet-drainer-setup-failure-log branch from 12c4a10 to 3c2b151 Compare June 17, 2026 14:58
@bluestreak01 bluestreak01 changed the title chore(qwp): quiet drainer setup-failure log to reduce CI noise chore(qwp): quiet only test-only drainer setup-failure log noise Jun 17, 2026
@mtopolnik

Copy link
Copy Markdown
Contributor

[PR Coverage check]

😍 pass : 3 / 4 (75.00%)

file detail

path covered line new line coverage
🔵 io/questdb/client/cutlass/qwp/client/sf/cursor/BackgroundDrainer.java 3 4 75.00%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants