You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/02/17 21:52:38 UTC

[GitHub] [bookkeeper] dlg99 opened a new issue #3063: Flaky-test: org.apache.distributedlog.TestBKDistributedLogManager testTwoWritersOnLockDisabled flakes with "KeeperErrorCode = BadVersion"

dlg99 opened a new issue #3063:
URL: https://github.com/apache/bookkeeper/issues/3063


   happens on attempt to create second writer immediately after the first one.
   i only was able to repro this by running the whole suite, rtest passses if I run just this test alone.
   Sleep between writer creations helps with the test but probably this worth looking at.
   
   ```
           AsyncLogWriter writer1 = Utils.ioResult(manager.openAsyncLogWriter());
           Utils.ioResult(writer1.write(DLMTestUtil.getLogRecordInstance(1L)));
           Assert.assertEquals(1L, writer1.getLastTxId());
           // some flaky ZK errors after that
           //Thread.sleep(1000);
           AsyncLogWriter writer2 = Utils.ioResult(manager.openAsyncLogWriter());
   
   ```
   
   ```
   13:48:06.116 [Time-limited test-EventThread] ERROR org.apache.distributedlog.bk.SimpleLedgerAllocator - Fail mark ledger 98 as allocated under /messaging/distributedlog/distrlog-two-writers-lock-disabled/distrlog-two-writers-lock-disabled/<default>/allocation : 
   org.apache.zookeeper.KeeperException$BadVersionException: KeeperErrorCode = BadVersion
   	at org.apache.zookeeper.KeeperException.create(KeeperException.java:122) ~[zookeeper-3.6.2.jar:3.6.2]
   	at org.apache.distributedlog.util.Utils$5.processResult(Utils.java:395) [main/:?]
   	at org.apache.bookkeeper.zookeeper.ZooKeeperClient$22$1.processResult(ZooKeeperClient.java:1094) [bookkeeper-server.jar:?]
   	at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:637) [zookeeper-3.6.2.jar:3.6.2]
   	at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:562) [zookeeper-3.6.2.jar:3.6.2]
   
   Encountered zookeeper exception on waiting result
   org.apache.distributedlog.exceptions.ZKException: Encountered zookeeper exception on waiting result
   	at app//org.apache.distributedlog.util.Utils.lambda$ioResult$0(Utils.java:693)
   	at app//org.apache.bookkeeper.common.concurrent.FutureUtils.result(FutureUtils.java:77)
   	at app//org.apache.distributedlog.util.Utils.ioResult(Utils.java:687)
   	at app//org.apache.distributedlog.TestBKDistributedLogManager.testTwoWritersOnLockDisabled(TestBKDistributedLogManager.java:365)
   	at java.base@11.0.11/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base@11.0.11/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base@11.0.11/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base@11.0.11/java.lang.reflect.Method.invoke(Method.java:566)
   	at app//org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
   	at app//org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   	at app//org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
   	at app//org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   	at app//org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
   	at app//org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
   	at java.base@11.0.11/java.util.concurrent.FutureTask.run(FutureTask.java:264)
   	at java.base@11.0.11/java.lang.Thread.run(Thread.java:829)
   Caused by: org.apache.zookeeper.KeeperException$BadVersionException: KeeperErrorCode = BadVersion
   	at app//org.apache.zookeeper.KeeperException.create(KeeperException.java:122)
   	at app//org.apache.distributedlog.util.Utils$5.processResult(Utils.java:395)
   	at app//org.apache.bookkeeper.zookeeper.ZooKeeperClient$22$1.processResult(ZooKeeperClient.java:1094)
   	at app//org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:637)
   	at app//org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:562)
   
   ```


-- 
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: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org