When proxy startup is complete throw ConcurrentModificationException
See original GitHub issueBug Report
Which version of ShardingSphere did you use?
master
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
Expected behavior
Normal start
Actual behavior
Throw exception after startup
Reason analyze (If you can)
[ERROR] 2022-05-18 10:47:51.113 [Curator-SafeNotifyService-0] c.g.common.eventbus.EventBus.default - Exception thrown by subscriber method renew(org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.XaRecoveryIdEvent) on subscriber org.apache.shardingsphere.mode.manager.cluster.coordinator.ClusterContextManagerCoordinator@4f1fb828 when dispatching event: org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.XaRecoveryIdEvent@2b12ab45 java.util.ConcurrentModificationException: null at java.util.HashMap$HashIterator.nextNode(HashMap.java:1445) at java.util.HashMap$EntryIterator.next(HashMap.java:1479) at java.util.HashMap$EntryIterator.next(HashMap.java:1477) at org.apache.shardingsphere.mode.manager.ContextManager.renewAllTransactionContext(ContextManager.java:602) at org.apache.shardingsphere.mode.manager.cluster.coordinator.ClusterContextManagerCoordinator.renew(ClusterContextManagerCoordinator.java:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:87) at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:144) at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:72) at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30) at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:67) at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:108) at com.google.common.eventbus.EventBus.post(EventBus.java:212) at java.util.Optional.ifPresent(Optional.java:159) at org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.GovernanceWatcherFactory.lambda$watch$0(GovernanceWatcherFactory.java:55) at org.apache.shardingsphere.mode.repository.cluster.zookeeper.CuratorZookeeperRepository.lambda$watch$0(CuratorZookeeperRepository.java:240) at org.apache.curator.framework.recipes.cache.TreeCacheListenerWrapper.sendEvent(TreeCacheListenerWrapper.java:71) at org.apache.curator.framework.recipes.cache.TreeCacheListenerWrapper.event(TreeCacheListenerWrapper.java:42) at org.apache.curator.framework.recipes.cache.CuratorCacheListenerBuilderImpl$2.lambda$event$0(CuratorCacheListenerBuilderImpl.java:149) at java.util.ArrayList.forEach(ArrayList.java:1257) at org.apache.curator.framework.recipes.cache.CuratorCacheListenerBuilderImpl$2.event(CuratorCacheListenerBuilderImpl.java:149) at org.apache.curator.framework.recipes.cache.CuratorCacheImpl.lambda$putStorage$7(CuratorCacheImpl.java:279) at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92) at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89) at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89) at org.apache.curator.framework.recipes.cache.CuratorCacheImpl.lambda$callListeners$10(CuratorCacheImpl.java:293) at java.util.concurrent.CompletableFuture$AsyncRun.run$$$capture(CompletableFuture.java:1640) at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java) 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)
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
I only configured server.yaml
`mode: type: Cluster repository: type: ZooKeeper props: namespace: pulsar server-lists: xxx:2181 retryIntervalMilliseconds: 500 timeToLiveSeconds: 60 maxRetries: 3 operationTimeoutMilliseconds: 500 overwrite: false
rules:
- !AUTHORITY
users:
- root@%:root
- sharding@:sharding provider: type: ALL_PERMITTED `
Example codes for reproduce this issue (such as a github link).
Pull the master code and modify the server.xml
Issue Analytics
- State:
- Created a year ago
- Comments:12 (11 by maintainers)
Hello , this issue has not received a reply for several days. This issue is supposed to be closed.
This problem cannot be reproduced. I close it.