You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/07/03 11:23:31 UTC
[GitHub] [shardingsphere-elasticjob-lite] terrymanu opened a new issue #928: Test case `org.apache.shardingsphere.elasticjob.lite.integrate.assertion.enable.oneoff.dataflow.StreamingDataflowElasticJobTest` may block or throw exception sometimes
terrymanu opened a new issue #928:
URL: https://github.com/apache/shardingsphere-elasticjob-lite/issues/928
Sometimes the test is block because the `StreamingDataflowElasticJob.isCompleted()` is never return true which maybe by thread safe reason.
The exception will throw sometimes, exception is:
```
[ERROR] 2020-07-03 19:20:51,443 --Curator-TreeCache-0-- [org.apache.curator.framework.imps.CuratorFrameworkImpl] Ensure path threw exception
java.lang.InterruptedException: null
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1039)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1328)
at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:277)
at org.apache.curator.CuratorZookeeperClient.internalBlockUntilConnectedOrTimedOut(CuratorZookeeperClient.java:325)
at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:106)
at org.apache.curator.framework.imps.NamespaceImpl.fixForNamespace(NamespaceImpl.java:83)
at org.apache.curator.framework.imps.CuratorFrameworkImpl.fixForNamespace(CuratorFrameworkImpl.java:594)
at org.apache.curator.framework.imps.ExistsBuilderImpl.forPath(ExistsBuilderImpl.java:151)
at org.apache.curator.framework.imps.ExistsBuilderImpl.forPath(ExistsBuilderImpl.java:39)
at org.apache.shardingsphere.elasticjob.lite.reg.zookeeper.ZookeeperRegistryCenter.isExisted(ZookeeperRegistryCenter.java:197)
at org.apache.shardingsphere.elasticjob.lite.internal.storage.JobNodeStorage.isJobNodeExisted(JobNodeStorage.java:56)
at org.apache.shardingsphere.elasticjob.lite.internal.election.LeaderService.hasLeader(LeaderService.java:91)
at org.apache.shardingsphere.elasticjob.lite.internal.election.ElectionListenerManager$LeaderElectionJobListener.isActiveElection(ElectionListenerManager.java:69)
at org.apache.shardingsphere.elasticjob.lite.internal.election.ElectionListenerManager$LeaderElectionJobListener.dataChanged(ElectionListenerManager.java:63)
at org.apache.shardingsphere.elasticjob.lite.internal.listener.AbstractJobListener.childEvent(AbstractJobListener.java:42)
at org.apache.curator.framework.recipes.cache.TreeCache$2.apply(TreeCache.java:732)
at org.apache.curator.framework.recipes.cache.TreeCache$2.apply(TreeCache.java:726)
at org.apache.curator.framework.listen.ListenerContainer$1.run(ListenerContainer.java:93)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299)
at org.apache.curator.framework.listen.ListenerContainer.forEach(ListenerContainer.java:85)
at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:725)
at org.apache.curator.framework.recipes.cache.TreeCache.access$1400(TreeCache.java:71)
at org.apache.curator.framework.recipes.cache.TreeCache$4.run(TreeCache.java:843)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[ERROR] 2020-07-03 19:20:51,448 --Curator-TreeCache-0-- [org.apache.curator.framework.recipes.cache.TreeCache]
java.lang.NullPointerException: null
at org.apache.shardingsphere.elasticjob.lite.internal.server.ServerNode.isLocalServerPath(ServerNode.java:61)
at org.apache.shardingsphere.elasticjob.lite.internal.election.ElectionListenerManager$LeaderElectionJobListener.isLocalServerEnabled(ElectionListenerManager.java:81)
at org.apache.shardingsphere.elasticjob.lite.internal.election.ElectionListenerManager$LeaderElectionJobListener.isActiveElection(ElectionListenerManager.java:69)
at org.apache.shardingsphere.elasticjob.lite.internal.election.ElectionListenerManager$LeaderElectionJobListener.dataChanged(ElectionListenerManager.java:63)
at org.apache.shardingsphere.elasticjob.lite.internal.listener.AbstractJobListener.childEvent(AbstractJobListener.java:42)
at org.apache.curator.framework.recipes.cache.TreeCache$2.apply(TreeCache.java:732)
at org.apache.curator.framework.recipes.cache.TreeCache$2.apply(TreeCache.java:726)
at org.apache.curator.framework.listen.ListenerContainer$1.run(ListenerContainer.java:93)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299)
at org.apache.curator.framework.listen.ListenerContainer.forEach(ListenerContainer.java:85)
at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:725)
at org.apache.curator.framework.recipes.cache.TreeCache.access$1400(TreeCache.java:71)
at org.apache.curator.framework.recipes.cache.TreeCache$4.run(TreeCache.java:843)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
```
----------------------------------------------------------------
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
[GitHub] [shardingsphere-elasticjob-lite] viviel commented on issue #928: Test case `org.apache.shardingsphere.elasticjob.lite.integrate.assertion.enable.oneoff.dataflow.StreamingDataflowElasticJobTest` may block or throw exception sometimes
Posted by GitBox <gi...@apache.org>.
viviel commented on issue #928:
URL: https://github.com/apache/shardingsphere-elasticjob-lite/issues/928#issuecomment-653502828
Can I have a try
----------------------------------------------------------------
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
[GitHub] [shardingsphere-elasticjob-lite] terrymanu closed issue #928: Test case `org.apache.shardingsphere.elasticjob.lite.integrate.assertion.enable.oneoff.dataflow.StreamingDataflowElasticJobTest` may block or throw exception sometimes
Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #928:
URL: https://github.com/apache/shardingsphere-elasticjob-lite/issues/928
----------------------------------------------------------------
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
[GitHub] [shardingsphere-elasticjob-lite] jiang2015 commented on issue #928: Test case `org.apache.shardingsphere.elasticjob.lite.integrate.assertion.enable.oneoff.dataflow.StreamingDataflowElasticJobTest` may block or throw exception sometimes
Posted by GitBox <gi...@apache.org>.
jiang2015 commented on issue #928:
URL: https://github.com/apache/shardingsphere-elasticjob-lite/issues/928#issuecomment-656477785
这个是因为测试用例job关闭后,触发了zk的下线监听事件,重新选取leader,但是因为没有job实体了,就可能获取到空的,然后就空异常了
补充:
listener在curator里是异步监听的。 test case结束后,会触发listener的回调。 这个时候,由于是异步,执行listener的线程执行到哪里就无法确认。对应这个case结束,会回调LeaderElectionJobListener,代码走在了isLocalServerEnabled里,执行到JobRegistry.getInstance().getJobInstance(jobName)时,获取结果为null,跑了NPE。
----------------------------------------------------------------
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
[GitHub] [shardingsphere-elasticjob-lite] viviel edited a comment on issue #928: Test case `org.apache.shardingsphere.elasticjob.lite.integrate.assertion.enable.oneoff.dataflow.StreamingDataflowElasticJobTest` may block or throw exception sometimes
Posted by GitBox <gi...@apache.org>.
viviel edited a comment on issue #928:
URL: https://github.com/apache/shardingsphere-elasticjob-lite/issues/928#issuecomment-653502828
Can I have a try?
----------------------------------------------------------------
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
[GitHub] [shardingsphere-elasticjob-lite] terrymanu commented on issue #928: Test case `org.apache.shardingsphere.elasticjob.lite.integrate.assertion.enable.oneoff.dataflow.StreamingDataflowElasticJobTest` may block or throw exception sometimes
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #928:
URL: https://github.com/apache/shardingsphere-elasticjob-lite/issues/928#issuecomment-653503232
@viviel Sure, I just assign to you.
----------------------------------------------------------------
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