Skip to content

Commit 236ea59

Browse files
authored
chore(qwp): quiet only test-only drainer setup-failure log noise
1 parent 2757b11 commit 236ea59

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

core/src/main/java/io/questdb/client/cutlass/qwp/client/sf/cursor/BackgroundDrainer.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,18 @@ public void run() {
313313
outcome = DrainOutcome.STOPPED;
314314
} catch (Throwable t) {
315315
String msg = t.getMessage();
316-
LOG.error("drainer setup failed for slot {}: {}", slotPath, msg, t);
316+
if (slotPath != null) {
317+
// Real orphan slot: a setup failure means unacked data on disk
318+
// could not be drained to the server -- a durability concern
319+
// that stays at ERROR so operators see it.
320+
LOG.error("drainer setup failed for slot {}: {}", slotPath, msg, t);
321+
} else if (LOG.isDebugEnabled()) {
322+
// Only @TestOnly drainers carry a null slot (zero segment size);
323+
// they fast-fail by design and would otherwise flood CI logs.
324+
// The isDebugEnabled() guard avoids the varargs array and the
325+
// message formatting when DEBUG is off, so it makes no garbage.
326+
LOG.debug("drainer setup failed for slot {}: {}", slotPath, msg, t);
327+
}
317328
lastErrorMessage = msg;
318329
try {
319330
OrphanScanner.markFailed(slotPath, "setup: " + msg);

0 commit comments

Comments
 (0)