[ 
https://issues.apache.org/jira/browse/TRAFODION-3183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16685062#comment-16685062
 ] 

ASF GitHub Bot commented on TRAFODION-3183:
-------------------------------------------

Github user mashengchen commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1694#discussion_r233000726
  
    --- Diff: 
core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/TrafT4ResultSet.java ---
    @@ -2779,6 +2779,19 @@ public boolean next() throws SQLException {
                                        maxRowCnt = maxRows - totalRowsFetched_;
                                }
     
    +        // if (row width) * (fetch rows) too large, there will have core 
in server side.
    +        // once fetch bytes bigger than 1GB, devide several times to fetch,
    +        // each time fetch bytes less than 1GB.
    +        if (outputDesc_ != null && outputDesc_[0] != null) {
    +          long rowLength = outputDesc_[0].rowLength_;
    +          long oneGB = 1024 * 1024 * 1024;
    +          if (rowLength * maxRowCnt >= oneGB) {
    +            double multi = (rowLength * maxRowCnt) / (double)oneGB;
    +            multi = Math.ceil(multi); // devide several times to fetch
    +            maxRowCnt = (int) (maxRowCnt / multi);
    +          }
    +        }
    +
    --- End diff --
    
    hi Selva , here is just change the maxRowCnt to a reasonable value. No need 
to loop,  jdbc then will fetch rows according to the changed maxRowCnt 


> fetch huge data from server side will have core 
> ------------------------------------------------
>
>                 Key: TRAFODION-3183
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-3183
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: client-jdbc-t4
>    Affects Versions: any
>            Reporter: mashengchen
>            Assignee: mashengchen
>            Priority: Major
>             Fix For: 2.4
>
>
> when search a table which row lenth is very large, and set fetch row a big 
> size then there will have core in server side, because of mxosrvr malloc a 
> large memory. Then client will met "Server aborted abnormally or Connection 
> timed out"



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to