massakam opened a new pull request #12565:
URL: https://github.com/apache/pulsar/pull/12565


   ### Motivation
   
   If we delete a persistent topic, the following error may be output to the 
broker log 4 hours later.
   ```
   2021-11-01T13:29:30,175+0900 [bookkeeper-ml-scheduler-OrderedScheduler-0-0] 
INFO  org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl - 
[public/default/persistent/t1] Start checking if current ledger is full
   2021-11-01T13:29:30,184+0900 [main-EventThread] WARN  
org.apache.bookkeeper.meta.AbstractZkLedgerManager - Ledger node does not exist 
in ZooKeeper: ledgerId=0
   2021-11-01T13:29:30,184+0900 [main-EventThread] ERROR 
org.apache.bookkeeper.client.MetadataUpdateLoop - 
UpdateLoop(ledgerId=0,loopId=4a56f38f) Error writing metadata to store
   
org.apache.bookkeeper.client.BKException$BKNoSuchLedgerExistsOnMetadataServerException:
 No such ledger exists on Metadata Server
           at 
org.apache.bookkeeper.meta.AbstractZkLedgerManager$4.processResult(AbstractZkLedgerManager.java:505)
 [bookkeeper-server-4.14.2.jar:4.14.2]
           at 
org.apache.pulsar.metadata.impl.PulsarZooKeeperClient$22$1.processResult(PulsarZooKeeperClient.java:1096)
 [pulsar-metadata.jar:2.10.0-SNAPSHOT]
           at 
org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:638) 
[zookeeper-3.6.3.jar:3.6.3]
           at 
org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:563) 
[zookeeper-3.6.3.jar:3.6.3]
   2021-11-01T13:29:30,189+0900 [main-EventThread] WARN  
org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl - Error when closing 
ledger 0. Status=No such ledger exists on Metadata Server
   ```
   
   This happens because a task that regularly rolls over a ledger attempts to 
close already deleted one. This task is canceled when the `ManagedLedgerImpl` 
is closed, but not when it is deleted.
   
   ### Modifications
   
   Cancel `checkLedgerRollTask` not only when closing `ManagedLedgerImpl`, but 
also when deleting it.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   ### Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API: (no)
     - The schema: (no)
     - The default values of configurations: (no)
     - The wire protocol: (no)
     - The rest endpoints: (no)
     - The admin cli options: (no)
     - Anything that affects deployment: (no)
   
   ### Documentation
   
   Check the box below and label this PR (if you have committer privilege).
     
   - [ ] `no-need-doc`
   


-- 
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]


Reply via email to