yashmayya commented on code in PR #12984: URL: https://github.com/apache/kafka/pull/12984#discussion_r1060450083
########## connect/runtime/src/main/java/org/apache/kafka/connect/storage/KafkaConfigBackingStore.java: ########## @@ -723,7 +752,11 @@ private void sendPrivileged(String key, byte[] value) { try { fencableProducer.beginTransaction(); - fencableProducer.send(new ProducerRecord<>(topic, key, value)); + fencableProducer.send(new ProducerRecord<>(topic, key, value), (metadata, exception) -> { Review Comment: I believe that `commitTransaction` ensures that all producer records are flushed and all pending callbacks invoked before the transaction is committed, so this - `where the callback error is propagated before calling the commitTransaction and getting the more generic error message.` should already be the case with the current changes? However, it doesn't look like using callbacks with the transactional producer offers much benefit - we could simply reword the existing exception message (`this may be due to a transient error and the request can be safely retried`) to indicate that it could potentially denote a non-transient error as well. Furthermore, the specific case that this PR attempted to fix (missing WRITE ACL on the config topic not being surfaced to users properly) is anyway highly unlikely to go unnoticed in an EOS enabled Connect cluster since the herder thread itself will repeatedly hit this condition [here](https://github.com/apache/kafka/blob/9d1f9f77642d7e95dec37647657478ed187bdeb7/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java#L419) in the tick loop (the worker logs will reveal the underlying `TopicAuthorizationException`) and request processing won't happen at all (all external requests that are run on the herder's thread will timeout). -- 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. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org