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

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

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

    https://github.com/apache/incubator-trafodion/pull/936#discussion_r98719683
  
    --- Diff: core/sql/generator/GenRelMisc.cpp ---
    @@ -3071,7 +3074,16 @@ short Sort::generateTdb(Generator * generator,
       sort_options->scratchFreeSpaceThresholdPct() = threshold;
       sort_options->sortMaxHeapSize() = 
(short)getDefault(SORT_MAX_HEAP_SIZE_MB);
       sort_options->mergeBufferUnit() = 
(short)getDefault(SORT_MERGE_BUFFER_UNIT_56KB);
    +  
       sort_options->scratchIOBlockSize() = 
(Int32)getDefault(SCRATCH_IO_BLOCKSIZE_SORT);
    +  if(sortRecLen >= sort_options->scratchIOBlockSize())
    +  {
    +    Int32 maxScratchIOBlockSize = 
(Int32)getDefault(SCRATCH_IO_BLOCKSIZE_SORT_MAX);
    +    GenAssert(sortRecLen <= maxScratchIOBlockSize, 
    +         "sortRecLen is greater than SCRATCH_IO_BLOCKSIZE_SORT_MAX");
    +    sort_options->scratchIOBlockSize() = MINOF(sortRecLen * 128, 
maxScratchIOBlockSize);
    --- End diff --
    
    Thanks for the explanation, @prashanth-vasudev.


> Sort scratch overflow has limitation on row size.
> -------------------------------------------------
>
>                 Key: TRAFODION-2466
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2466
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: -exe
>            Reporter: Prashanth Vasudev
>            Assignee: Prashanth Vasudev
>
> In sort overflow to disk scenarios, if row size is greater than 512kb, causes 
> memory corruption and process aborts.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to