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/04 19:20:41 UTC

[GitHub] [shardingsphere] imjcoder opened a new issue, #18177: #C1997Runtime exception...

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

   #C1997Runtime exception:[Inline sharding algorithms expression `ds_${user_id % 2}` and sharding column `user_id` not match.]


-- 
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] imjcoder commented on issue #18177: #C1997Runtime exception...

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

   @zjcnb 
   hello,this is config 
   and Are there any cases that can run?
   too many bugs.....
   
   `# 使用navicate for mysql的时候显示的数据库的名称
   schemaName: sharding_db
   
   dataSources:
     db0:
       url: jdbc:mysql://127.0.0.1:3306/db0?serverTimezone=UTC&useSSL=false
       username: root
       password: root
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     db1:
       url: jdbc:mysql://127.0.0.1:3306/db1?serverTimezone=UTC&useSSL=false
       username: root
       password: root
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
   
   rules:
   - !SHARDING
     tables:
       t_order:
         actualDataNodes: db${0..1}.t_order${0..3}
         tableStrategy:
           standard:
             shardingColumn: order_id
             shardingAlgorithmName: userTableInline
         databaseStrategy:
           standard:
             shardingColumn: order_id
             shardingAlgorithmName: userDbInline
     shardingAlgorithms:
       userTableInline:
         type: INLINE
         props:
           algorithm-expression: t_order${order_id % 4}
       userDbInline:
         type: INLINE
         props:
           algorithm-expression: db${order_id % 2}
   `


-- 
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 #18177: #C1997Runtime exception...

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

   ```
   spring:
     shardingsphere:
       datasource:
         names: ds0, ds1
         ds0:
           type: com.zaxxer.hikari.HikariDataSource
           driverClassName: com.mysql.cj.jdbc.Driver
           jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
           username: root
           password: 123456
           poolName: datasource-one
         ds1:
           type: com.zaxxer.hikari.HikariDataSource
           driverClassName: com.mysql.cj.jdbc.Driver
           jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
           username: root
           password: 123456
           poolName: datasource-two
       rules:
         sharding:
           tables:
             t_order:
               actual-data-nodes: db$->{0..1}.t_order$->{0..3}
               table-strategy:
                 standard:
                   sharding-algorithm-name: user-table-inline
                   sharding-column: order_id
               database-strategy:
                 standard:
                   sharding-algorithm-name: user-db-inline
                   sharding-column: order_id
           sharding-algorithms:
             user-table-inline:
               type: INLINE
               props:
                 algorithm-expression: t_order$->{order_id % 4}
             user-db-inline:
               type: INLINE
               props:
                 algorithm-expression: db$->{order_id % 2}
   ```
   
   Please refer to this config.


-- 
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] terrymanu closed issue #18177: #C1997Runtime exception...

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #18177: #C1997Runtime exception...
URL: https://github.com/apache/shardingsphere/issues/18177


-- 
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 #18177: #C1997Runtime exception...

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

   @imjcoder Can you provide your configuration?


-- 
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] terrymanu commented on issue #18177: #C1997Runtime exception...

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

   Can you change the 1st comment, I can't get your point


-- 
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] terrymanu commented on issue #18177: #C1997Runtime exception...

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

   Closed because of no feedback


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