zshaojie commented on issue #31661:
URL: 
https://github.com/apache/shardingsphere/issues/31661#issuecomment-2581997964

   We have the same issue.
   **config**
   rules:
     - !SHARDING
       tables:
         tb_user_draw_record:
           #        actualDataSources: db_0
           actualDataNodes: db_0.tb_user_draw_record_${0..9}
           tableStrategy:
             standard:
               shardingColumn: activity_id
               shardingAlgorithmName: tb_user_draw_record_hash_mod_10
         tb_user_draw_win_record:
           #        actualDataSources: db_0
           actualDataNodes: db_0.tb_user_draw_win_record_${0..9}
           tableStrategy:
             standard:
               shardingColumn: activity_id
               shardingAlgorithmName: tb_user_draw_win_record_hash_mod_10
       # 分片算法配置
       shardingAlgorithms:
         tb_user_draw_record_hash_mod_10:
           type: INLINE
           props:
             algorithm-expression: tb_user_draw_record_${activity_id % 10}
         tb_user_draw_win_record_hash_mod_10:
           type: INLINE
           props:
             algorithm-expression: tb_user_draw_win_record_${activity_id % 10}
   
   **ERROR**
   Caused by: java.sql.SQLException: Routed target `tb_user_draw_record_0` does 
not exist, available targets are `[tb_user_draw_win_record_0, 
tb_user_draw_win_record_1, tb_user_draw_win_record_2, 
tb_user_draw_win_record_3, tb_user_draw_win_record_4, 
tb_user_draw_win_record_5, tb_user_draw_win_record_6, 
tb_user_draw_win_record_7, tb_user_draw_win_record_8, 
tb_user_draw_win_record_9]`.
        at 
org.apache.shardingsphere.infra.exception.core.external.sql.ShardingSphereSQLException.toSQLException(ShardingSphereSQLException.java:62)
        at 
org.apache.shardingsphere.infra.exception.dialect.SQLExceptionTransformEngine.toSQLException(SQLExceptionTransformEngine.java:54)
        at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.execute(ShardingSpherePreparedStatement.java:425)
        at 
com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
        at 
com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
        at sun.reflect.GeneratedMethodAccessor336.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)
        at com.sun.proxy.$Proxy197.execute(Unknown Source)
        at 
org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)
        at 
org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)
        at sun.reflect.GeneratedMethodAccessor335.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64)
        at com.sun.proxy.$Proxy196.query(Unknown Source)
        at 
org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)
        at 
org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)
        at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to