diff --git a/streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java b/streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java index d74e10c98556f..5b9ebadb5da3b 100644 --- a/streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java +++ b/streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java @@ -426,14 +426,11 @@ boolean tryToCompleteRestoration(final long now) { try { task.initializeIfNeeded(); task.clearTaskTimeout(); - } catch (final LockException retriableException) { + } catch (final LockException lockException) { // it is possible that if there are multiple threads within the instance that one thread // trying to grab the task from the other, while the other has not released the lock since // it did not participate in the rebalance. In this case we can just retry in the next iteration - log.debug( - String.format("Could not initialize %s due to the following exception; will retry", task.id()), - retriableException - ); + log.debug("Could not initialize task {} since: {}; will retry", task.id(), lockException.getMessage()); allRunning = false; } catch (final TimeoutException timeoutException) { task.maybeInitTaskTimeoutOrThrow(now, timeoutException);