Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
stillya committed Dec 12, 2023
1 parent 0969e05 commit ed34f30
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,6 @@ public void destroy() {
}
});
this.cache.clear();
this.transactionIdSuffixStrategy.reset();
this.threadBoundProducers.values().forEach(prod -> {
try {
prod.closeDelegate(this.physicalCloseTimeout, this.listeners);
Expand All @@ -727,6 +726,7 @@ public void destroy() {
LOGGER.error(e, "Exception while closing producer");
}
});
this.transactionIdSuffixStrategy.reset();
this.threadBoundProducers.clear();
this.epoch.incrementAndGet();
}
Expand Down Expand Up @@ -901,7 +901,9 @@ private void closeTransactionProducer(CloseSafeProducer<K, V> producer, Duration
producer.closeDelegate(timeout, listeners);
}
finally {
this.transactionIdSuffixStrategy.releaseSuffix(producer.txIdPrefix, producer.txIdSuffix);
if (producer.epoch == this.epoch.get()) {
this.transactionIdSuffixStrategy.releaseSuffix(producer.txIdPrefix, producer.txIdSuffix);
}
}
}

Expand Down

0 comments on commit ed34f30

Please sign in to comment.