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/11/15 06:59:42 UTC

[GitHub] [shardingsphere] peilinqian commented on issue #21421: Fetch forward is none and returns “ERROR: Index: 0”

peilinqian commented on issue #21421:
URL: https://github.com/apache/shardingsphere/issues/21421#issuecomment-1314860930

   ```
   [INFO ] 2022-11-15 14:57:58.220 [Connection-7-ThreadExecutor] ShardingSphere-SQL - Actual SQL: write_0 ::: fetch FORWARD ALL from cur_test_01_t_ssdb;
   [INFO ] 2022-11-15 14:57:58.220 [Connection-7-ThreadExecutor] ShardingSphere-SQL - Actual SQL: write_1 ::: fetch FORWARD ALL from cur_test_01_t_ssdb;
   [INFO ] 2022-11-15 14:57:58.236 [Connection-7-ThreadExecutor] ShardingSphere-SQL - Logic SQL: fetch forward cur_test_01;
   [INFO ] 2022-11-15 14:57:58.236 [Connection-7-ThreadExecutor] ShardingSphere-SQL - SQLStatement: OpenGaussFetchStatement(super=FetchStatement(super=AbstractSQLStatement(parameterCount=0, parameterMarkerSegments=[], commentSegments=[]), cursorName=CursorNameSegment(startIndex=14, stopIndex=24, identifier=IdentifierValue(value=cur_test_01, quoteCharacter=NONE)), direction=Optional[DirectionSegment(startIndex=6, stopIndex=12, directionType=Optional[FORWARD], count=Optional.empty)]))
   [INFO ] 2022-11-15 14:57:58.236 [Connection-7-ThreadExecutor] ShardingSphere-SQL - Actual SQL: write_0 ::: fetch  FORWARD 1  cur_test_01_t_ssdb;
   [INFO ] 2022-11-15 14:57:58.236 [Connection-7-ThreadExecutor] ShardingSphere-SQL - Actual SQL: write_1 ::: fetch  FORWARD 1  cur_test_01_t_ssdb;
   [ERROR] 2022-11-15 14:57:58.240 [Connection-7-ThreadExecutor] o.a.s.p.f.c.CommandExecutorTask - Exception occur:
   java.lang.IndexOutOfBoundsException: Index: 0
           at java.util.Collections$EmptyList.get(Collections.java:4456)
           at org.apache.shardingsphere.sharding.merge.dql.orderby.OrderByValue.compareTo(OrderByValue.java:120)
           at org.apache.shardingsphere.sharding.merge.dql.orderby.OrderByValue.compareTo(OrderByValue.java:43)
           at java.util.PriorityQueue.siftUpComparable(PriorityQueue.java:656)
           at java.util.PriorityQueue.siftUp(PriorityQueue.java:647)
           at java.util.PriorityQueue.offer(PriorityQueue.java:344)
           at org.apache.shardingsphere.sharding.merge.ddl.fetch.FetchStreamMergedResult.addOrderedResultSetsToQueue(FetchStreamMergedResult.java:133)
           at org.apache.shardingsphere.sharding.merge.ddl.fetch.FetchStreamMergedResult.<init>(FetchStreamMergedResult.java:66)
           at org.apache.shardingsphere.sharding.merge.ddl.ShardingDDLResultMerger.merge(ShardingDDLResultMerger.java:58)
           at org.apache.shardingsphere.infra.merge.MergeEngine.executeMerge(MergeEngine.java:82)
           at org.apache.shardingsphere.infra.merge.MergeEngine.merge(MergeEngine.java:71)
           at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.mergeQuery(DatabaseCommunicationEngine.java:174)
           at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.processExecuteQuery(DatabaseCommunicationEngine.java:140)
           at org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:134)
           at org.apache.shardingsphere.proxy.frontend.opengauss.command.query.simple.OpenGaussComQueryExecutor.execute(OpenGaussComQueryExecutor.java:76)
           at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:111)
           at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:78)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
           at java.lang.Thread.run(Thread.java:748)
   [INFO ] 2022-11-15 14:57:58.242 [Connection-7-ThreadExecutor] ShardingSphere-SQL - Logic SQL: close cur_test_01;
   [INFO ] 2022-11-15 14:57:58.242 [Connection-7-ThreadExecutor] ShardingSphere-SQL - SQLStatement: OpenGaussCloseStatement(super=CloseStatement(super=AbstractSQLStatement(parameterCount=0, parameterMarkerSegments=[], commentSegments=[]), cursorName=Optional[CursorNameSegment(startIndex=6, stopIndex=16, identifier=IdentifierValue(value=cur_test_01, quoteCharacter=NONE))], closeAll=false))
   [INFO ] 2022-11-15 14:57:58.242 [Connection-7-ThreadExecutor] ShardingSphere-SQL - Actual SQL: write_0 ::: close cur_test_01_t_ssdb;
   [INFO ] 2022-11-15 14:57:58.242 [Connection-7-ThreadExecutor] ShardingSphere-SQL - Actual SQL: write_1 ::: close cur_test_01_t_ssdb;
   ```
   
   
   
   ```
   [peilq_sharding@kwemhisprc10431 auto_test]$ bash ss_home/bin/start.sh --version
   we find java version: java8, full_version=1.8.0_282, full_path=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-1.el7_9.x86_64/bin/java
   ShardingSphere-5.2.1-SNAPSHOT
   Commit ID: dirty-20bf595dfeced4dd8ffee2f6d95de52fdf3e569d
   Commit Message: Rename sub modules of shardingsphere-infra-datetime-type. (#21472)
   Branch: 20bf595dfeced4dd8ffee2f6d95de52fdf3e569d
   Build time: 2022-11-11T19:57:07+0800
   
   ```


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