cadonna commented on a change in pull request #9984: URL: https://github.com/apache/kafka/pull/9984#discussion_r566935095
########## File path: streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java ########## @@ -1046,13 +1045,20 @@ private StreamThread createAndAddStreamThread(final long cacheSizePerThread, fin try { removeMembersFromConsumerGroupResult.memberResult(memberToRemove).get(timeoutMs - begin, TimeUnit.MILLISECONDS); } catch (final java.util.concurrent.TimeoutException e) { - log.warn("Rethrowing a java TimeoutException as a kafka TimeoutException " + Arrays.toString(e.getStackTrace())); - throw new TimeoutException(e.getMessage()); + log.error("Could not remove static member {} from consumer group {} due to a timeout: {}", + groupInstanceID.get(), config.getString(StreamsConfig.APPLICATION_ID_CONFIG), e); + throw new TimeoutException(e.getMessage(), e); } catch (final InterruptedException e) { Thread.currentThread().interrupt(); } catch (final ExecutionException e) { - log.error("Getting the member result threw this ExecutionException: " + e.getMessage()); - throw new StreamsException("Could not remove member from group for the following reason: ", e.getCause()); + log.error("Could not remove static member {} from consumer group {} due to: {}", + groupInstanceID.get(), config.getString(StreamsConfig.APPLICATION_ID_CONFIG), e); + throw new StreamsException( + "Could not remove static member " + groupInstanceID.get() + + " from consumer group " + config.getString(StreamsConfig.APPLICATION_ID_CONFIG) + + " the following reason: ", Review comment: ```suggestion + " for the following reason: ", ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org