mingyifei opened a new issue, #17767:
URL: https://github.com/apache/shardingsphere/issues/17767
## Bug 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
--
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:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]