pengzhiming-sys opened a new issue #7064:
URL: https://github.com/apache/shardingsphere/issues/7064


   ## Bug Report
   
   server.yaml:
   authentication:
   users:
   root:
   password: root
   sharding:
   password: sharding
   authorizedSchemas: sharding_pg
   
   props:
   max.connections.size.per.query: 1
   acceptor.size: 16 # The default value is available processors count * 2.
   executor.size: 16 # Infinite by default.
   proxy.frontend.flush.threshold: 128 # The default value is 128.
   
   # LOCAL: Proxy will run with LOCAL transaction.
   # XA: Proxy will run with XA transaction.
   # BASE: Proxy will run with B.A.S.E transaction.
   proxy.transaction.type: LOCAL
   proxy.opentracing.enabled: false
   proxy.hint.enabled: false
   query.with.cipher.column: true
   sql.show: false
   allow.range.query.with.inline.sharding: false
   
   config-sharding.yaml 配置如下:
   
   schemaName: sharding_pg
   
   dataSources:
   ds_0:
   url: 
jdbc:postgresql://172.22.2.21:5432/o3test?currentSchema=public&serverTimezone=UTC&useSSL=false
   username: poc_cnoss_sub
   password: poc_cnoss_sub
   connectionTimeoutMilliseconds: 30000
   idleTimeoutMilliseconds: 60000
   maxLifetimeMilliseconds: 1800000
   maxPoolSize: 50
   ds_1:
   url: 
jdbc:postgresql://172.22.2.21:5432/itsp?currentSchema=public&serverTimezone=UTC&useSSL=false
   username: poc_cnoss_sub
   password: poc_cnoss_sub
   connectionTimeoutMilliseconds: 30000
   idleTimeoutMilliseconds: 60000
   maxLifetimeMilliseconds: 1800000
   maxPoolSize: 50
   
   shardingRule:
   tables:
   lab_labelcatalog:
   actualDataNodes: ds_${0..1}.lab_labelcatalog_${0}
   databaseStrategy:
   inline:
   shardingColumn: catalogId
   algorithmExpression: ds_${catalogId % 2}
   tableStrategy:
   inline:
   shardingColumn: uuid
   algorithmExpression: lab_labelcatalog_${uuid % 2}
   
   error:
   
   
org.apache.shardingsphere.underlying.common.config.exception.ShardingSphereConfigurationException:
 Cannot find table rule and default data source with logic table: 'pg_type'
   at 
org.apache.shardingsphere.core.rule.ShardingRule.getTableRule(ShardingRule.java:166)
   at 
org.apache.shardingsphere.sharding.route.engine.type.unicast.ShardingUnicastRoutingEngine.route(ShardingUnicastRoutingEngine.java:72)
   at 
org.apache.shardingsphere.sharding.route.engine.ShardingRouteDecorator.decorate(ShardingRouteDecorator.java:69)
   at 
org.apache.shardingsphere.sharding.route.engine.ShardingRouteDecorator.decorate(ShardingRouteDecorator.java:53)
   at 
org.apache.shardingsphere.underlying.route.DataNodeRouter.executeRoute(DataNodeRouter.java:91)
   at 
org.apache.shardingsphere.underlying.route.DataNodeRouter.route(DataNodeRouter.java:76)
   at 
org.apache.shardingsphere.underlying.pluggble.prepare.PreparedQueryPrepareEngine.route(PreparedQueryPrepareEngine.java:54)
   at 
org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.executeRoute(BasePrepareEngine.java:96)
   at 
org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.prepare(BasePrepareEngine.java:83)
   at 
org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.wrapper.PreparedStatementExecutorWrapper.doShardingRoute(PreparedStatementExecutorWrapper.java:83)
   at 
org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.wrapper.PreparedStatementExecutorWrapper.route(PreparedStatementExecutorWrapper.java:66)
   at 
org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:74)
   at 
org.apache.shardingsphere.shardingproxy.frontend.postgresql.command.query.binary.bind.PostgreSQLComBindExecutor.execute(PostgreSQLComBindExecutor.java:81)
   at 
org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:93)
   at 
org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:71)
   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] 15:01:48.001 [pool-8-thread-1] o.a.s.s.f.c.CommandExecutorTask - 
Exception occur:
   
org.apache.shardingsphere.underlying.common.config.exception.ShardingSphereConfigurationException:
 Cannot find table rule and default data source with logic table: 'pg_type'
   at 
org.apache.shardingsphere.core.rule.ShardingRule.getTableRule(ShardingRule.java:166)
   at 
org.apache.shardingsphere.sharding.route.engine.type.unicast.ShardingUnicastRoutingEngine.route(ShardingUnicastRoutingEngine.java:72)
   at 
org.apache.shardingsphere.sharding.route.engine.ShardingRouteDecorator.decorate(ShardingRouteDecorator.java:69)
   at 
org.apache.shardingsphere.sharding.route.engine.ShardingRouteDecorator.decorate(ShardingRouteDecorator.java:53)
   at 
org.apache.shardingsphere.underlying.route.DataNodeRouter.executeRoute(DataNodeRouter.java:91)
   at 
org.apache.shardingsphere.underlying.route.DataNodeRouter.route(DataNodeRouter.java:76)
   at 
org.apache.shardingsphere.underlying.pluggble.prepare.PreparedQueryPrepareEngine.route(PreparedQueryPrepareEngine.java:54)
   at 
org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.executeRoute(BasePrepareEngine.java:96)
   at 
org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.prepare(BasePrepareEngine.java:83)
   at 
org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.wrapper.PreparedStatementExecutorWrapper.doShardingRoute(PreparedStatementExecutorWrapper.java:83)
   at 
org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.wrapper.PreparedStatementExecutorWrapper.route(PreparedStatementExecutorWrapper.java:66)
   at 
org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:74)
   at 
org.apache.shardingsphere.shardingproxy.frontend.postgresql.command.query.binary.bind.PostgreSQLComBindExecutor.execute(PostgreSQLComBindExecutor.java:81)
   at 
org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:93)
   at 
org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:71)
   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)
   line 1:42 no viable alternative at input '(catalogid,uuid'
   line 1:42 no viable alternative at input '(catalogid,uuid'
   [ERROR] 15:02:52.174 [pool-8-thread-1] o.a.s.s.f.c.CommandExecutorTask - 
Exception occur:
   java.lang.NullPointerException: null
   at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
   at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.impl.PostgreSQLDMLVisitor.visitInsert(PostgreSQLDMLVisitor.java:118)
   at 
org.apache.shardingsphere.sql.parser.postgresql.visitor.impl.PostgreSQLDMLVisitor.visitInsert(PostgreSQLDMLVisitor.java:112)
   at 
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser$InsertContext.accept(PostgreSQLStatementParser.java:625)
   at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
   at 
org.apache.shardingsphere.sql.parser.SQLParserEngine.parse0(SQLParserEngine.java:80)
   at 
org.apache.shardingsphere.sql.parser.SQLParserEngine.parse(SQLParserEngine.java:61)
   at 
org.apache.shardingsphere.shardingproxy.frontend.postgresql.command.query.binary.parse.PostgreSQLComParseExecutor.execute(PostgreSQLComParseExecutor.java:53)
   at 
org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:93)
   at 
org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:71)
   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] 15:02:52.175 [pool-8-thread-1] o.a.s.s.f.c.CommandExecutorTask - 
Exception occur:
   java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
   at java.util.ArrayList.rangeCheck(ArrayList.java:657)
   at java.util.ArrayList.get(ArrayList.java:433)
   at 
org.apache.shardingsphere.database.protocol.postgresql.packet.command.query.binary.bind.PostgreSQLComBindPacket.getParameters(PostgreSQLComBindPacket.java:74)
   at 
org.apache.shardingsphere.database.protocol.postgresql.packet.command.query.binary.bind.PostgreSQLComBindPacket.(PostgreSQLComBindPacket.java:61)
   at 
org.apache.shardingsphere.database.protocol.postgresql.packet.command.PostgreSQLCommandPacketFactory.newInstance(PostgreSQLCommandPacketFactory.java:57)
   at 
org.apache.shardingsphere.shardingproxy.frontend.postgresql.command.PostgreSQLCommandExecuteEngine.getCommandPacket(PostgreSQLCommandExecuteEngine.java:55)
   at 
org.apache.shardingsphere.shardingproxy.frontend.postgresql.command.PostgreSQLCommandExecuteEngine.getCommandPacket(PostgreSQLCommandExecuteEngine.java:46)
   at 
org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:91)
   at 
org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:71)
   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)
   
   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?
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ### Expected behavior
   
   ### Actual behavior
   
   ### 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:
[email protected]


Reply via email to