Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

[transactions] Reduce spammy log during broker shutdown #1896

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import org.apache.kafka.common.requests.TransactionResult;
import org.apache.kafka.common.requests.WriteTxnMarkersRequest.TxnMarkerEntry;
import org.apache.pulsar.client.api.Authentication;
import org.apache.pulsar.client.api.PulsarClientException;
import org.apache.pulsar.client.impl.AuthenticationUtil;
import org.apache.pulsar.common.util.FutureUtil;
import org.apache.pulsar.common.util.netty.ChannelFutures;
Expand Down Expand Up @@ -329,7 +330,13 @@ public void addTxnMarkersToBrokerQueue(String transactionalId,

addressFuture.whenComplete((address, throwable) -> {
if (throwable != null) {
log.warn("Failed to find broker for topic partition {}", topicPartition, throwable);
if (throwable instanceof PulsarClientException.LookupException
|| throwable.getCause() instanceof PulsarClientException.LookupException) {
log.warn("Failed to find broker for topic partition {} - {}", topicPartition,
throwable.toString());
} else {
log.warn("Failed to find broker for topic partition {}", topicPartition, throwable);
}
unknownBrokerTopicList.add(topicPartition);
addFuture.complete(null);
return;
Expand Down