line / decaton

High throughput asynchronous task processing on Apache Kafka
Apache License 2.0
336 stars 51 forks source link

Silence WARNs during rebalancing #185

Open mauhiz opened 1 year ago

mauhiz commented 1 year ago

On decaton 6, observing the following WARNs, when

com.linecorp.decaton.processor.runtime.internal.CommitManager:131

Offset commit failed asynchronously

org.apache.kafka.common.errors.RebalanceInProgressException: Offset commit cannot be completed since the consumer is undergoing a rebalance for auto partition assignment. You can try completing the rebalance by calling poll() and then retry the operation.

I don't think the end-user needs to know about this, since poll() is soon going to be called again in ProcessorSubscription.consumeLoop

ocadaruma commented 1 year ago

Thanks for reporting the issue.

However, I prefer to keep WARN level for these commit failures because:

So I would like to keep WARN by default for these commit-failure. Users still can silence if necessary by logger config (e.g. logback).

mauhiz commented 1 year ago

Can you recommend a way to only silence retryable commit exceptions? As far as I know logback config doesn't allow to filter log level by keyword in the stacktrace

ocadaruma commented 1 year ago

I think you can try EvaluationFilter and set the expression like

<expression>return throwable instanceof org.apache.kafka.clients.consumer.RetriableCommitFailedException;</expression>
mauhiz commented 1 year ago

okay, I don't know if it has reasonable performance, but at least there is a way :-)