You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "PeiMouRen (via GitHub)" <gi...@apache.org> on 2023/06/06 06:22:24 UTC

[GitHub] [shardingsphere] PeiMouRen opened a new issue, #26069: proxy5.3.2: NPE was reported when using `count(*)` to query sharding table

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

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   5.3.2
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   proxy
   ### Expected behavior
   get `count(*)` result by querying the sharding table
   ### Actual behavior
   NPE was reported
   ![image](https://github.com/apache/shardingsphere/assets/46043280/6276e363-f69d-418f-8130-86b33c5a1066)
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   **sharding rule:**
   ```yaml
   rules:
   - !SHARDING
     tables:
       T_Service_Order:
         actualDataNodes: ds_${0..7}.T_Service_Order
         databaseStrategy:
           standard:
             shardingColumn: Super_Account_No
             shardingAlgorithmName: database_mod
     shardingAlgorithms:
       database_mod:
         type: MOD
         props:
           sharding-count: 8
   ```
   **datasource:**
   ```yaml
   dataSources:
     ds_0:
       url: jdbc:postgresql://127.0.0.1:5432/db0
       username: test
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_1:
       url: jdbc:postgresql://127.0.0.1:5432/db1
       username: test
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_2:
       url: jdbc:postgresql://127.0.0.1:5432/db2
       username: test
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_3:
       url: jdbc:postgresql://127.0.0.1:5432/db3
       username: test
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_4:
       url: jdbc:postgresql://127.0.0.1:5432/db4
       username: test
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_5:
       url: jdbc:postgresql://127.0.0.1:5432/db5
       username: test
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_6:
       url: jdbc:postgresql://127.0.0.1:5432/db6
       username: test
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_7:
       url: jdbc:postgresql://127.0.0.1:5432/db7
       username: test
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
   ```
   **query data:**
   ```sql
   select * from t_service_order where Super_Account_No in ('1', '2');
   ```
   ![image](https://github.com/apache/shardingsphere/assets/46043280/15367a97-9730-47b6-b2e0-d1d1dfc26d68)
   ![image](https://github.com/apache/shardingsphere/assets/46043280/46b2f823-f279-4e8e-b547-a27ae1e1764e)
   
   **query count:**
   ```sql
   select count(*) from t_service_order;
   ```
   ![image](https://github.com/apache/shardingsphere/assets/46043280/8f992643-2a8d-487e-9b25-0bcf3bf03b56)
   ![image](https://github.com/apache/shardingsphere/assets/46043280/d8e8912f-8c32-43dd-9526-4115e37d970f)
   
   ### 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] PeiMouRen commented on issue #26069: proxy5.3.2: NPE was reported when using `count(*)` to query sharding table

Posted by "PeiMouRen (via GitHub)" <gi...@apache.org>.
PeiMouRen commented on issue #26069:
URL: https://github.com/apache/shardingsphere/issues/26069#issuecomment-1590281846

   @strongduanmu May I ask if there is any progress on this iuuse?


-- 
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] PeiMouRen closed issue #26069: proxy5.3.2: NPE was reported when using `count(*)` to query sharding table

Posted by "PeiMouRen (via GitHub)" <gi...@apache.org>.
PeiMouRen closed issue #26069: proxy5.3.2: NPE was reported when using `count(*)` to query sharding table
URL: https://github.com/apache/shardingsphere/issues/26069


-- 
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 #26069: proxy5.3.2: NPE was reported when using `count(*)` to query sharding table

Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on issue #26069:
URL: https://github.com/apache/shardingsphere/issues/26069#issuecomment-1578511182

   @PeiMouRen Thank you for your feedback, I will investigate this issue.


-- 
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] PeiMouRen commented on issue #26069: proxy5.3.2: NPE was reported when using `count(*)` to query sharding table

Posted by "PeiMouRen (via GitHub)" <gi...@apache.org>.
PeiMouRen commented on issue #26069:
URL: https://github.com/apache/shardingsphere/issues/26069#issuecomment-1605907846

   I don't know why, now I put the table in a custom schema, and after a few reboots and deleting the configuration in zookeeper, now proxy support queries like `count(*)`, that is so strange.


-- 
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] PeiMouRen commented on issue #26069: proxy5.3.2: NPE was reported when using `count(*)` to query sharding table

Posted by "PeiMouRen (via GitHub)" <gi...@apache.org>.
PeiMouRen commented on issue #26069:
URL: https://github.com/apache/shardingsphere/issues/26069#issuecomment-1594515334

   These tables are placed in a custom pg schema, when i move table to the `public` schema, the above exception disappear. Does proxy not support pg schema now?


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