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 2022/06/18 15:17:13 UTC

[GitHub] [shardingsphere] wsm12138 opened a new issue, #18421: When use SS & openGaussDB

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

   ## 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: java8, full_version=1.8.0_131
   ShardingSphere-5.1.2-SNAPSHOT
   Commit ID: dirty-1b77c33983198a420e974a302d2a891ca05ae664
   Commit Message: Support openGauss cursor, close, move and fetch statements route and rewrite in sharding scenario (#18148)
   Branch: 1b77c33983198a420e974a302d2a891ca05ae664
   Build time: 2022-06-02T15:58:32+0800
   ```
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
    ShardingSphere-Proxy
   ### Expected behavior
   no errors
   ### Actual behavior
   ```
   - everything you need to get the most out of using Atomikos!
   [INFO ] 2022-06-03 16:29:27.677 [main] o.a.s.p.v.ShardingSphereProxyVersion - Database name is `PostgreSQL`, version is `9.2.4`, database name is `test`
   [INFO ] 2022-06-03 16:29:27.897 [main] o.a.s.p.frontend.ShardingSphereProxy - ShardingSphere-Proxy Memory mode started successfully
   [ERROR] 2022-06-03 16:29:34.161 [Connection-93-ThreadExecutor] o.a.s.p.f.c.CommandExecutorTask - Exception occur:
   java.lang.NullPointerException: null
       at org.apache.shardingsphere.sharding.rule.ShardingRule.findTableRule(ShardingRule.java:398)
       at org.apache.shardingsphere.sharding.rule.ShardingRule.getJoinConditionTables(ShardingRule.java:803)
       at org.apache.shardingsphere.sharding.rule.ShardingRule.isJoinConditionContainsShardingColumns(ShardingRule.java:782)
       at org.apache.shardingsphere.sharding.rule.ShardingRule.isAllBindingTables(ShardingRule.java:483)
       at org.apache.shardingsphere.sharding.route.engine.type.ShardingRouteEngineFactory.getDQLRouteEngineForShardingTable(ShardingRouteEngineFactory.java:202)
       at org.apache.shardingsphere.sharding.route.engine.type.ShardingRouteEngineFactory.getDQLRoutingEngine(ShardingRouteEngineFactory.java:196)
       at org.apache.shardingsphere.sharding.route.engine.type.ShardingRouteEngineFactory.newInstance(ShardingRouteEngineFactory.java:102)
       at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:57)
       at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:45)
       at org.apache.shardingsphere.infra.route.engine.impl.PartialSQLRouteExecutor.route(PartialSQLRouteExecutor.java:68)
       at org.apache.shardingsphere.infra.route.engine.SQLRouteEngine.route(SQLRouteEngine.java:53)
       at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.route(KernelProcessor.java:54)
       at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.generateExecutionContext(KernelProcessor.java:46)
       at org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:124)
       at org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.JDBCPortal.bind(JDBCPortal.java:131)
       at org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.bind.PostgreSQLComBindExecutor.execute(PostgreSQLComBindExecutor.java:54)
       at org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.PostgreSQLAggregatedCommandExecutor.execute(PostgreSQLAggregatedCommandExecutor.java:41)
       at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:106)
       at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:76)
       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)
   [ERROR] 2022-06-03 16:29:34.197 [Connection-184-ThreadExecutor] o.a.s.p.f.c.CommandExecutorTask - Exception occur:
   java.lang.NullPointerException: null
       at org.apache.shardingsphere.sharding.rule.ShardingRule.findTableRule(ShardingRule.java:398)
       at org.apache.shardingsphere.sharding.rule.ShardingRule.getJoinConditionTables(ShardingRule.java:803)
       at org.apache.shardingsphere.sharding.rule.ShardingRule.isJoinConditionContainsShardingColumns(ShardingRule.java:782)
       at org.apache.shardingsphere.sharding.rule.ShardingRule.isAllBindingTables(ShardingRule.java:483)
       at org.apache.shardingsphere.sharding.route.engine.type.ShardingRouteEngineFactory.getDQLRouteEngineForShardingTable(ShardingRouteEngineFactory.java:202)
       at org.apache.shardingsphere.sharding.route.engine.type.ShardingRouteEngineFactory.getDQLRoutingEngine(ShardingRouteEngineFactory.java:196)
       at org.apache.shardingsphere.sharding.route.engine.type.ShardingRouteEngineFactory.newInstance(ShardingRouteEngineFactory.java:102)
       at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:57)
   
   ```
   ### Reason analyze (If you can)
   Our test program uses the openGauss postgres library, which contains the gaussdb schema by default. At the same time, our username is also gaussdb, which will implicitly trigger the search path logic of the underlying database. All the test tables were created in the gaussdb schema. During the pressure test, SS did not implement the search path function, and the tables were searched in the public schema by default, so an exception occurred.
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   #### config-sharding.yaml
   ```
   schemaName: test
   
   dataSources:
     ds_0:
       url: jdbc:postgresql://ip:5555/postgres
       username: gaussdb
       password: 
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 3000
       minPoolSize: 1
   
   
   rules:
     - !SHARDING
       bindingTables:
         - bmsql_warehouse, bmsql_customer
         - bmsql_stock, bmsql_district, bmsql_order_line
       defaultDatabaseStrategy:
         none:
       defaultTableStrategy:
         none:
       keyGenerators:
         snowflake:
           type: SNOWFLAKE
       tables:
         bmsql_config:
           actualDataNodes: ds_0.bmsql_config
   
         bmsql_warehouse:
           actualDataNodes: ds_0.bmsql_warehouse
           databaseStrategy:
             standard:
               shardingColumn: w_id
               shardingAlgorithmName: mod_1
   
         bmsql_district:
           actualDataNodes: ds_0.bmsql_district
           databaseStrategy:
             standard:
               shardingColumn: d_w_id
               shardingAlgorithmName: mod_1
   
         bmsql_customer:
           actualDataNodes: ds_0.bmsql_customer
           databaseStrategy:
             standard:
               shardingColumn: c_w_id
               shardingAlgorithmName: mod_1
   
   ...
   ```
   #### server.yaml
   ```
   rules:
     - !AUTHORITY
       users:
         - root@%:root
       provider:
         type: ALL_PRIVILEGES_PERMITTED
   
   
   props:
   ```
   ### 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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

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


[GitHub] [shardingsphere] github-actions[bot] closed issue #18421: When use SS & openGaussDB , exception occur.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #18421: When use SS & openGaussDB , exception occur.
URL: https://github.com/apache/shardingsphere/issues/18421


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] github-actions[bot] commented on issue #18421: When use SS & openGaussDB , exception occur.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #18421:
URL: https://github.com/apache/shardingsphere/issues/18421#issuecomment-1272349603

   Hello , this issue has not received a reply for several days.
   This issue is supposed to be closed.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] zhaojinchao95 commented on issue #18421: When use SS & openGaussDB , exception occur.

Posted by GitBox <gi...@apache.org>.
zhaojinchao95 commented on issue #18421:
URL: https://github.com/apache/shardingsphere/issues/18421#issuecomment-1321821877

   @wsm12138 Hi, The Memory mode are removed in master branch. I can't reproduce this problem


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] zjcnb commented on issue #18421: When use SS & openGaussDB , exception occur.

Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #18421:
URL: https://github.com/apache/shardingsphere/issues/18421#issuecomment-1223933186

   > @zjcnb Can we finish this issue in 5.1.3?
   
   No, i will remove it to next milestone.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] strongduanmu commented on issue #18421: When use SS & openGaussDB , exception occur.

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #18421:
URL: https://github.com/apache/shardingsphere/issues/18421#issuecomment-1223591036

   @zjcnb Can we finish this issue in 5.1.3?


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] strongduanmu commented on issue #18421: When use SS & openGaussDB , exception occur.

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #18421:
URL: https://github.com/apache/shardingsphere/issues/18421#issuecomment-1275441194

   This issue is related with #17204. Since implementing search path is a long-term task, I will temporarily remove milestone.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] wsm12138 commented on issue #18421: When use SS & openGaussDB , exception occur.

Posted by GitBox <gi...@apache.org>.
wsm12138 commented on issue #18421:
URL: https://github.com/apache/shardingsphere/issues/18421#issuecomment-1159482888

   @zjcnb 


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] TeslaCN closed issue #18421: When use SS & openGaussDB , exception occur.

Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #18421: When use SS & openGaussDB , exception occur.
URL: https://github.com/apache/shardingsphere/issues/18421


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] zjcnb commented on issue #18421: When use SS & openGaussDB , exception occur.

Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #18421:
URL: https://github.com/apache/shardingsphere/issues/18421#issuecomment-1159580476

   > @zjcnb
   
   Thx, i will follow up it.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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