mirror of https://github.com/apache/kafka.git
KAFKA-10169: Error message when transit to Aborting / AbortableError / FatalError (#8880)
Reviewers: John Roesler <vvcephei@apache.org>
This commit is contained in:
parent
e5bb535860
commit
bea5ceb434
|
|
@ -741,6 +741,7 @@ public class KafkaProducer<K, V> implements Producer<K, V> {
|
|||
public void abortTransaction() throws ProducerFencedException {
|
||||
throwIfNoTransactionManager();
|
||||
throwIfProducerClosed();
|
||||
log.info("Aborting incomplete transaction");
|
||||
TransactionalRequestResult result = transactionManager.beginAbort();
|
||||
sender.wakeup();
|
||||
result.await(maxBlockTimeMs, TimeUnit.MILLISECONDS);
|
||||
|
|
|
|||
|
|
@ -478,10 +478,12 @@ public class TransactionManager {
|
|||
return;
|
||||
}
|
||||
|
||||
log.info("Transiting to abortable error state due to {}", exception.toString());
|
||||
transitionTo(State.ABORTABLE_ERROR, exception);
|
||||
}
|
||||
|
||||
synchronized void transitionToFatalError(RuntimeException exception) {
|
||||
log.info("Transiting to fatal error state due to {}", exception.toString());
|
||||
transitionTo(State.FATAL_ERROR, exception);
|
||||
|
||||
if (pendingResult != null) {
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ public class RecordCollectorImpl implements RecordCollector {
|
|||
*/
|
||||
@Override
|
||||
public void close() {
|
||||
log.debug("Closing record collector");
|
||||
log.info("Closing record collector");
|
||||
|
||||
if (eosEnabled) {
|
||||
streamsProducer.abortTransaction();
|
||||
|
|
|
|||
Loading…
Reference in New Issue