wangleigithub opened a new issue #8517:
URL: https://github.com/apache/shardingsphere/issues/8517


   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
    5.0.0-alpha
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ss-proxy
   ### Expected behavior
   
   
   
   ### Actual behavior
   when proxy query a large table with limit  will cause a oom
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   I have a sharding table , the config :
    rules:
   - !SHARDING
     tables:
       z_f_woman:
         actualDataNodes: ds_${0..2}.z_f_woman_${0..8}
         databaseStrategy:
           standard:
             shardingColumn: w_id
             shardingAlgorithmName: ds_inline_z_f_woman
         tableStrategy:
           standard:
             shardingColumn: w_id
             shardingAlgorithmName: z_f_woman_inline
         keyGenerateStrategy:
           column: w_id
           keyGeneratorName: snowflake
     defaultTableStrategy:
       none:
    
     shardingAlgorithms:
       ds_inline_z_f_woman:
         type: INLINE
         props:
           algorithm-expression: ds_$->{Long.valueOf(w_id) % 3}
       z_f_woman_inline:
         type: INLINE
         props:
           algorithm-expression: z_f_woman_$->{Long.valueOf(w_id) % 9}
   
   my sql :
   select ID, W_ID, F_NO, IDCARD, NAME, SEX, MARRYID, NATIONID, BIRTHDAY, 
CENSUSID, EDUID, RELATIONID, SINGLE, CENSUSCODE, CENSUSADDR, CENSUS_DNO, 
ADDRCODE, ADDRESS, ADDRDOORNO, OCCUPAID, JOBADDR, COMPANYID, SERVERID, TEL, 
CAREDATE, CARE_ID, CARDDATE, FLOWID, FLOWSTATE, ADDCODE, PT_ID, REMARKS, 
LOGOUTID, LOGOUTDATE, IN_DATE, LEAVE_DATE, OUT_DATE, BACK_DATE, FAMILY_INFO, 
FLOW_REASON, CONTRAID, NOWCONDATE, H_PID, H_NAME, H_IDCARD, M_ID, M_NAME, 
M_IDCARD, F_ID, F_NAME, F_IDCARD, FMARRYDATE, LMARRYDATE, KIDSNUM, BOYSNUM, 
STATISTID, ISADDRESSINTO, ISCENSUSINTO, SOURCEINFO, ADDTIME, ADDBY, ADDIP, 
UPDATETIME, UPDATEBY, UPDATEIP, VERIFYDATE from z_f_woman
    LIMIT 0,721690
   
   exception:
   java.sql.SQLException: Java heap space
        at 
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
        at 
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
        at 
com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
        at 
com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:764)
        at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:781)
        at 
com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:103)
        at 
com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)
        at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.statement.accessor.impl.StatementAccessor.execute(StatementAccessor.java:43)
        at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.ProxySQLExecutorCallback.executeSQL(ProxySQLExecutorCallback.java:84)
        at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.ProxySQLExecutorCallback.executeSQL(ProxySQLExecutorCallback.java:79)
        at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.ProxySQLExecutorCallback.executeSQL(ProxySQLExecutorCallback.java:48)
        at 
org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.executor.impl.DefaultSQLExecutorCallback.execute0(DefaultSQLExecutorCallback.java:75)
        at 
org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.executor.impl.DefaultSQLExecutorCallback.execute(DefaultSQLExecutorCallback.java:57)
        at 
org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel.syncExecute(ExecutorKernel.java:99)
        at 
org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel.parallelExecute(ExecutorKernel.java:95)
        at 
org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel.execute(ExecutorKernel.java:78)
        at 
org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.executor.SQLExecutor.execute(SQLExecutor.java:65)
        at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.JDBCExecuteEngine.executeWithManagedResource(JDBCExecuteEngine.java:130)
        at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.JDBCExecuteEngine.execute(JDBCExecuteEngine.java:123)
        at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.JDBCExecuteEngine.execute(JDBCExecuteEngine.java:103)
        at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.doExecute(JDBCDatabaseCommunicationEngine.java:93)
        at 
org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:79)
        at 
org.apache.shardingsphere.proxy.backend.text.query.QueryBackendHandler.execute(QueryBackendHandler.java:61)
        at 
org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:62)
        at 
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:100)
        at 
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:76)
        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)
   
   I have try add "useCursorFetch=true" property in jdbc connect config, also 
add it in client config file. It seems not work.
   
   ### Example codes for reproduce this issue (such as a github link).
   


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

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


Reply via email to