shardingsphere-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [shardingsphere] xize0 opened a new issue #12001: Sharding - proxy fails ,The error message:`java.lang.IndexOutOfBoundsException: Index: 24, Size: 24
Date Wed, 25 Aug 2021 09:03:35 GMT

xize0 opened a new issue #12001:
URL: https://github.com/apache/shardingsphere/issues/12001


   ## Question
   Docker starts the latest image
   
   In the same configuration, some succeeded and some failed, such as the TOPS table.
   Tops has tens of millions of pieces of data
   
   config-sharding.yaml
   `schemaName: sharding-sharding  
   
   dataSources:
     ds:
       url: jdbc:mysql://192.168.1.106:3306/sharding?allowMultiQueries=true&useUnicode&characterEncoding=UTF-8&autoReconnect=true&useSSL=true&verifyServerCertificate=false&requireSSL=true&zeroDateTimeBehavior=convertToNull
       username: test
       password: tgb123_321
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1  
       
   
   
   rules:
   - !SHARDING
     tables: 
       topics:
         actualDataNodes: ds.topics_${0..9}
         tableStrategy:   
             standard:
               shardingColumn: userid
               shardingAlgorithmName: topics_inline
       topics_info:
         actualDataNodes: ds.topics_info_${0..9}
         tableStrategy:   
             standard:
               shardingColumn: userid
               shardingAlgorithmName: topics_info_inline
       replies:
         actualDataNodes: ds.replies_${0..9}
         tableStrategy:   
             standard:
               shardingColumn: topicid
               shardingAlgorithmName: replies_inline
       replies_info:
         actualDataNodes: ds.replies_info_${0..9}
         tableStrategy:   
             standard:
               shardingColumn: topicid
               shardingAlgorithmName: replies_info_inline
       replies_user:
         actualDataNodes: ds.replies_user_${0..9}
         tableStrategy:   #分表规则
             standard:
               shardingColumn: userid
               shardingAlgorithmName: replies_user_inline
       tops:
         actualDataNodes: ds.tops_${0..9}
         tableStrategy:   
             standard:
               shardingColumn: userid
               shardingAlgorithmName: tops_inline
       cardRecord:
         actualDataNodes: ds.cardRecord_${0..9}
         tableStrategy:   
             standard:
               shardingColumn: userid
               shardingAlgorithmName: cardRecord_inline
   
     bindingTables: 
       - topics,topics_info,replies,replies_info,replies_user,tops,cardRecord
     defaultDatabaseStrategy: 
     defaultTableStrategy:
       none:
   
     shardingAlgorithms:       
       topics_inline:
         type: INLINE
         props:
           algorithm-expression: topics_${userid % 10}
       topics_info_inline:
         type: INLINE
         props:
           algorithm-expression: topics_info_${userid % 10}
       replies_inline:
         type: INLINE
         props:
           algorithm-expression: replies_${topicid % 10} 
       replies_info_inline:
         type: INLINE
         props:
           algorithm-expression: replies_info_${topicid % 10}
       replies_user_inline:
         type: INLINE
         props:
           algorithm-expression: replies_user_${userid % 10}
       tops_inline:
         type: INLINE
         props:
           algorithm-expression: tops_${userid % 10}
       cardRecord_inline:
         type: INLINE
         props:
           algorithm-expression: cardRecord_${userid % 10}
   
   `
   Log an error:
   `java.lang.IndexOutOfBoundsException: Index: 24, Size: 24
   	at java.util.ArrayList.rangeCheck(ArrayList.java:653)
   	at java.util.ArrayList.get(ArrayList.java:429)
   	at org.apache.shardingsphere.infra.executor.sql.execute.result.query.type.memory.AbstractMemoryQueryResult.getValue(AbstractMemoryQueryResult.java:61)
   	at org.apache.shardingsphere.infra.merge.result.impl.stream.StreamMergedResult.getValue(StreamMergedResult.java:47)
   	at org.apache.shardingsphere.infra.merge.result.impl.decorator.DecoratorMergedResult.getValue(DecoratorMergedResult.java:39)
   	at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.getQueryResponseRow(DatabaseCommunicationEngine.java:181)
   	at org.apache.shardingsphere.proxy.backend.text.data.impl.SchemaAssignedDatabaseBackendHandler.getRowData(SchemaAssignedDatabaseBackendHandler.java:65)
   	at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.getQueryRowPacket(MySQLComQueryPacketExecutor.java:80)
   	at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.getQueryRowPacket(MySQLComQueryPacketExecutor.java:42)
   	at org.apache.shardingsphere.proxy.frontend.mysql.command.MySQLCommandExecuteEngine.writeQueryData(MySQLCommandExecuteEngine.java:88)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:99)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:71)
   	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:745)`
   
   


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



Mime
View raw message