From 81a28f5ca8199bcc4f02f662894f15ac510083d7 Mon Sep 17 00:00:00 2001 From: Matteo Merli Date: Wed, 16 Sep 2026 17:13:38 -0700 Subject: [PATCH] [improve][client] Log V5 segment-gone send retries at DEBUG A segment split terminates the parent segment topic before the new layout is published, so the per-segment v4 producer fails every pending message in one burst and the V5 producer retries each of them until the DAG watch delivers the new layout. Each retry was logged at INFO, one line per in-flight message, which floods the log on every split at a high publish rate. The split itself stays visible through the INFO "Closing producer for sealed segment" and "Layout applied" lines; the per-message retries are a DEBUG-level detail. --- .../apache/pulsar/client/impl/v5/ScalableTopicProducer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pulsar-client-v5/src/main/java/org/apache/pulsar/client/impl/v5/ScalableTopicProducer.java b/pulsar-client-v5/src/main/java/org/apache/pulsar/client/impl/v5/ScalableTopicProducer.java index d2684b032c15c..465cc33b5cdb6 100644 --- a/pulsar-client-v5/src/main/java/org/apache/pulsar/client/impl/v5/ScalableTopicProducer.java +++ b/pulsar-client-v5/src/main/java/org/apache/pulsar/client/impl/v5/ScalableTopicProducer.java @@ -435,7 +435,7 @@ MessageIdV5 sendInternal( // regular-to-scalable migration. Drop the stale per-segment producer and wait // for the DAG watch to deliver the new layout; routeMessage on the next attempt // lands on an active child. - log.info().attr("segmentId", segmentId).attr("attempt", attempt + 1) + log.debug().attr("segmentId", segmentId).attr("attempt", attempt + 1) .log("Target segment gone, waiting for layout update"); segmentProducers.remove(segmentId); // The message stays with this layer while it waits for the new layout. @@ -622,7 +622,7 @@ private void handleAsyncSegmentFailure(PendingSend send, long segmentId, int attempt, Throwable ex, Runnable retry) { Throwable cause = ex instanceof CompletionException ? ex.getCause() : ex; if (isSegmentGoneError(cause) && attempt < SEND_RETRY_MAX_ATTEMPTS) { - log.info().attr("segmentId", segmentId).attr("attempt", attempt + 1) + log.debug().attr("segmentId", segmentId).attr("attempt", attempt + 1) .log("Target segment gone, retrying async send after layout update"); retry.run(); } else {