You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/11/10 18:38:42 UTC
[GitHub] [pulsar] rdhabalia opened a new pull request #5604: [pulsar-broker]
recover zk-badversion while updating cursor metadata
rdhabalia opened a new pull request #5604: [pulsar-broker] recover zk-badversion while updating cursor metadata
URL: https://github.com/apache/pulsar/pull/5604
### Motivation
Due to bugs while unloading topic, we have seen that current owner-broker of topic sees below exception while updating cursor metadata. because of that cursor metadata doesn't updated into zk and broker restart builds huge backlog.
```
01:02:30.993 [bookkeeper-ml-workers-OrderedExecutor-3-0] WARN org.apache.bookkeeper.mledger.impl.ManagedCursorImpl - [prop/cluster/ns/persistent/topic-partit
ion-53] Failed to update consumer sub1
org.apache.bookkeeper.mledger.ManagedLedgerException$BadVersionException: org.apache.zookeeper.KeeperException$BadVersionException: KeeperErrorCode = BadVersion
Caused by: org.apache.zookeeper.KeeperException$BadVersionException: KeeperErrorCode = BadVersion
at org.apache.zookeeper.KeeperException.create(KeeperException.java:118) ~[zookeeper-3.4.13.jar:3.4.13-2d71af4dbe22557fda74f9a9b4309b15a7487f03]
at org.apache.bookkeeper.mledger.impl.MetaStoreImplZookeeper.lambda$null$125(MetaStoreImplZookeeper.java:288) ~[managed-ledger-original-2.4.5-yahoo.jar:2.4.5-yahoo]
at org.apache.bookkeeper.mledger.util.SafeRun$1.safeRun(SafeRun.java:32) [managed-ledger-original-2.4.5-yahoo.jar:2.4.5-yahoo]
at org.apache.bookkeeper.common.util.SafeRunnable.run(SafeRunnable.java:36) [bookkeeper-common-4.9.0.jar:4.9.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-all-4.1.32.Final.jar:4.1.32.Final]
at java.lang.Thread.run(Thread.java:834) [?:?]
```
In this case, broker-ml should have capability to recover from `BadVersionException` error by checking ownership of managed-ledger and refreshing the version.
### Modification
ML checks ownership and refresh metadata's zk-version to recover from `BadVersionException`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services