Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky-test: org.apache.distributedlog.TestBKDistributedLogManager testTwoWritersOnLockDisabled flakes with "KeeperErrorCode = BadVersion" #3063

Open
dlg99 opened this issue Feb 17, 2022 · 0 comments

Comments

@dlg99
Copy link
Contributor

dlg99 commented Feb 17, 2022

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 [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at [email protected]/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 [email protected]/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at [email protected]/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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants