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 2021/06/07 06:20:50 UTC

[GitHub] [shardingsphere] strongduanmu opened a new issue #10693: Distsql create sharding table rule error

strongduanmu opened a new issue #10693:
URL: https://github.com/apache/shardingsphere/issues/10693


   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   master branch
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy & governance
   
   ### Expected behavior
   
   create sharding table rule success
   
   ### Actual behavior
   
   Proxy response is ok, and metadata is corrent, but proxy backend occurs exception.
   
   ```
   line 1:7 no viable alternative at input 'CREATESHARDING'
   line 1:7 no viable alternative at input 'CREATESHARDING'
   六月 07, 2021 2:14:21 下午 com.google.common.eventbus.EventBus$LoggingHandler handleException
   严重: Exception thrown by subscriber method renew(org.apache.shardingsphere.governance.core.registry.config.event.rule.RuleConfigurationsChangedEvent) on subscriber org.apache.shardingsphere.governance.context.metadata.GovernanceMetaDataContexts@4d98e41b when dispatching event: org.apache.shardingsphere.governance.core.registry.config.event.rule.RuleConfigurationsChangedEvent@617c0679
   org.apache.shardingsphere.infra.exception.ShardingSphereException: Cannot find data source in sharding rule, invalid actual data node is: 'resource0.t_order_dist_0'
           at org.apache.shardingsphere.sharding.rule.TableRule.generateDataNodes(TableRule.java:171)
           at org.apache.shardingsphere.sharding.rule.TableRule.<init>(TableRule.java:110)
           at org.apache.shardingsphere.sharding.rule.ShardingRule.createAutoTableRule(ShardingRule.java:163)
           at org.apache.shardingsphere.sharding.rule.ShardingRule.lambda$createAutoTableRules$6(ShardingRule.java:157)
           at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
           at java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1235)
           at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
           at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
           at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
           at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
           at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
           at org.apache.shardingsphere.sharding.rule.ShardingRule.createAutoTableRules(ShardingRule.java:157)
           at org.apache.shardingsphere.sharding.rule.ShardingRule.<init>(ShardingRule.java:105)
           at org.apache.shardingsphere.sharding.rule.builder.ShardingRuleBuilder.build(ShardingRuleBuilder.java:37)
           at org.apache.shardingsphere.sharding.rule.builder.ShardingRuleBuilder.build(ShardingRuleBuilder.java:33)
           at org.apache.shardingsphere.infra.rule.builder.ShardingSphereRulesBuilder.lambda$buildSchemaRules$0(ShardingSphereRulesBuilder.java:66)
           at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
           at java.util.Iterator.forEachRemaining(Iterator.java:116)
           at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
           at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
           at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
           at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
           at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
           at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
           at org.apache.shardingsphere.infra.rule.builder.ShardingSphereRulesBuilder.buildSchemaRules(ShardingSphereRulesBuilder.java:66)
           at org.apache.shardingsphere.infra.context.metadata.MetaDataContextsBuilder.buildMetaData(MetaDataContextsBuilder.java:99)
           at org.apache.shardingsphere.infra.context.metadata.MetaDataContextsBuilder.build(MetaDataContextsBuilder.java:90)
           at org.apache.shardingsphere.governance.context.metadata.GovernanceMetaDataContexts.getChangedMetaData(GovernanceMetaDataContexts.java:368)
           at org.apache.shardingsphere.governance.context.metadata.GovernanceMetaDataContexts.renew(GovernanceMetaDataContexts.java:261)
           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.governance.core.registry.GovernanceWatcherFactory.lambda$watch$0(GovernanceWatcherFactory.java:59)
           at org.apache.shardingsphere.governance.repository.zookeeper.CuratorZookeeperRepository.lambda$watch$1(CuratorZookeeperRepository.java:247)
           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.util.concurrent.CompletableFuture$AsyncRun.run$$$capture(CompletableFuture.java:1626)
           at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
           at java.lang.Thread.run(Thread.java:748)
   ```
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   ### 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero closed issue #10693: Distsql create sharding table rule error

Posted by GitBox <gi...@apache.org>.
tristaZero closed issue #10693:
URL: https://github.com/apache/shardingsphere/issues/10693


   


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