zhenglu8 opened a new issue, #17999:
URL: https://github.com/apache/shardingsphere/issues/17999

   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   we find java version: java17, full_version=17.0.1
   ShardingSphere-5.1.2-SNAPSHOT
   Commit ID: babecb70bd7210789b983087fbb82cc725bf857c
   Commit Message: Support parsing `CREATE CAST` in openGauss (#17986)
   Branch: master
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   ### Expected behavior
   no error
   ### Actual behavior
   
   ```
   [ERROR] 2022-05-27 13:45:20.014 [Curator-SafeNotifyService-0] 
c.g.common.eventbus.EventBus.default - Exception thrown by subscriber method 
renew(org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.storage.event.DisabledStateChangedEvent)
 on subscriber 
org.apache.shardingsphere.mode.manager.cluster.coordinator.ClusterContextManagerCoordinator@76b642aa
 when dispatching event: 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.storage.event.DisabledStateChangedEvent@2b673c93
   java.lang.NullPointerException: Cannot invoke 
"org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase.getRuleMetaData()"
 because the return value of "java.util.Map.get(Object)" is null
           at 
org.apache.shardingsphere.mode.manager.cluster.coordinator.ClusterContextManagerCoordinator.renew(ClusterContextManagerCoordinator.java:182)
           at jdk.internal.reflect.GeneratedMethodAccessor81.invoke(Unknown 
Source)
           at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.base/java.lang.reflect.Method.invoke(Method.java:568)
           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.base/java.util.Optional.ifPresent(Optional.java:178)
           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:48)
           at 
org.apache.curator.framework.recipes.cache.CuratorCacheListenerBuilderImpl$2.lambda$event$0(CuratorCacheListenerBuilderImpl.java:149)
           at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
           at 
org.apache.curator.framework.recipes.cache.CuratorCacheListenerBuilderImpl$2.event(CuratorCacheListenerBuilderImpl.java:149)
           at 
org.apache.curator.framework.recipes.cache.CuratorCacheImpl.lambda$putStorage$6(CuratorCacheImpl.java:274)
           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.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
           at java.base/java.lang.Thread.run(Thread.java:833)
   ```
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   ```
   ADD RESOURCE ds_0 (
       
URL="jdbc:mysql://192.168.10.18:33307/original_1?serverTimezone=UTC&useSSL=false",
       USER=root,
       PASSWORD=password
   ), ds_1 (
       
URL="jdbc:mysql://192.168.10.18:33307/original_2?serverTimezone=UTC&useSSL=false",
       USER=root,
       PASSWORD=password
   );
   
   CREATE SHARDING TABLE RULE t_order(
   RESOURCES(ds_0,ds_1),
   SHARDING_COLUMN=order_id,
   TYPE(NAME=hash_mod,PROPERTIES("sharding-count"=4)),
   
KEY_GENERATE_STRATEGY(COLUMN=order_id,TYPE(NAME=snowflake,PROPERTIES("worker-id"=123)))
   ), t_order_item(
   RESOURCES(ds_0,ds_1),
   SHARDING_COLUMN=order_id,
   TYPE(NAME=hash_mod,PROPERTIES("sharding-count"=4)),
   
KEY_GENERATE_STRATEGY(COLUMN=order_id,TYPE(NAME=snowflake,PROPERTIES("worker-id"=123)))
   );
   
   CREATE SHARDING BINDING TABLE RULES (t_order,t_order_item);
   
   ADD RESOURCE ds_3 (
       
URL="jdbc:mysql://192.168.10.18:33307/new_1?serverTimezone=UTC&useSSL=false",
       USER=root,
       PASSWORD=password
   ), ds_4 (
       
URL="jdbc:mysql://192.168.10.18:33307/new_2?serverTimezone=UTC&useSSL=false",
       USER=root,
       PASSWORD=password
   ), ds_5 (
       
URL="jdbc:mysql://192.168.10.18:33307/new_3?serverTimezone=UTC&useSSL=false",
       USER=root,
       PASSWORD=password
   );
   
   ALTER SHARDING TABLE RULE t_order(
       RESOURCES(ds_3,ds_4,ds_5),
       SHARDING_COLUMN=order_id,
       TYPE(NAME=hash_mod,PROPERTIES("sharding-count"=6)),
       
KEY_GENERATE_STRATEGY(COLUMN=order_id,TYPE(NAME=snowflake,PROPERTIES("worker-id"=123)))
       ), t_order_item(
       RESOURCES(ds_3,ds_4,ds_5),
       SHARDING_COLUMN=order_id,
       TYPE(NAME=hash_mod,PROPERTIES("sharding-count"=6)),
       
KEY_GENERATE_STRATEGY(COLUMN=order_id,TYPE(NAME=snowflake,PROPERTIES("worker-id"=123)))
   );
   
   CHECK SCALING XXX BY type(name=CRC32_MATCH);
   ERROR 1997 (C1997): Runtime exception: [Count check failed for table 
't_order']  
   ```
   
   ### Example codes for reproduce this issue (such as a github link).
   


-- 
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]

Reply via email to