Avoid unnecessary lock acquire when KafkaConsumer commits offsets
Avoid unnecessary lock acquire when KafkaConsumer commits offsets.
Reviewers: Viktor Somogyi-Vass Guozhang Wang
@@ -1459,12 +1459,7 @@ public class KafkaConsumer<K, V> implements Consumer<K, V> {
*/
@Override
public void commitAsync(OffsetCommitCallback callback) {
- acquireAndEnsureOpen();
- try {
commitAsync(subscriptions.allConsumed(), callback);
- } finally {
- release();
- }
}
/**
