eolivelli commented on code in PR #17736:
URL: https://github.com/apache/pulsar/pull/17736#discussion_r977249528
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -3842,12 +3868,21 @@ private void scheduleTimeoutTask() {
? Math.max(config.getAddEntryTimeoutSeconds(),
config.getReadEntryTimeoutSeconds())
: timeoutSec;
this.timeoutTask =
this.scheduledExecutor.scheduleAtFixedRate(safeRun(() -> {
- checkAddTimeout();
- checkReadTimeout();
+ checkTimeouts();
}), timeoutSec, timeoutSec, TimeUnit.SECONDS);
}
}
+ private void checkTimeouts() {
+ final State state = STATE_UPDATER.get(this);
+ if (state == State.Closed
+ || state == State.Fenced) {
+ return;
Review Comment:
there are already logs that say that we fenced or closed the topic.
I don't think it is worth to add something more
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]