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

   use version 5.5.1 the when program start there will be throw a exception 
   
   `Sharding algorithm HASH_MOD initialization failed, table xxx tables 
sharding configuration can not use auto sharding algorithm...`
   
   the config is:
   ```
               sharding:
                 tables:
                   ai_agent_session:
                     actual-data-nodes: session_${0..15}
                     table-strategy:
                       standard:
                         sharding-column: uid
                         sharding-algorithm-name: session_hash_mod              
    
                 sharding-algorithms:
                   session_hash_mod:
                     type: HASH_MOD
                     props:
                       sharding-count: 16
   ```
   
   i saw the code sharding-jdbc will check the shardingAlgorithm is 
`ShardingAutoTableAlgorithm`
   i change the HASH_MOD to INLINE it is have no exception. 
   
   ```
   private void checkManualShardingAlgorithm(String shardingAlgorithmName, 
String logicTable) {
           ShardingAlgorithm shardingAlgorithm = 
(ShardingAlgorithm)this.shardingAlgorithms.get(shardingAlgorithmName);
           ShardingSpherePreconditions.checkState(!(shardingAlgorithm 
instanceof ShardingAutoTableAlgorithm), () -> {
               return new AlgorithmInitializationException(shardingAlgorithm, 
"`%s` tables sharding configuration can not use auto sharding algorithm.", new 
Object[]{logicTable});
           });
       }
   ```
   
   so how to fix 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: 
[email protected]

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

Reply via email to