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

Qifan Chen commented on TRAFODION-1431:
---------------------------------------


The fix involves the following two changes.

1.  Modify all code path for node map creations for HBase tables to go through 
static function createNodeMapForHbase()
2. in createNodeMapForHbase(), initialize the node map Id for every Node Map 
entry. 
3. In DEBUG mode only, in NAClusterInfo::NAClusterInfo(CollHeap * heap), add 
the node name of the current host node to the name list. This allows a node ID 
of 0 to be added to the node map (instead of 01 before the change). 

> Compiler dumps core when compiling load transform query with ESP colocation 
> feature is on
> -----------------------------------------------------------------------------------------
>
>                 Key: TRAFODION-1431
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-1431
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmp
>    Affects Versions: 1.1 (pre-incubation)
>            Reporter: Qifan Chen
>            Assignee: Qifan Chen
>              Labels: patch
>
> Conditions. 
> 1.  The query loads data into a salted HBase table. 
> 2. The ESP colocation feature is turned on (via CQD TRAF_ALLOW_ESP_COLOCATION 
> 'ON')
> The stack trace is as follows. 
> #7  NAHeap::unlinkLargeFragment (this=0x7fca76a004c8, treeFrag=0x7fca70350ea0)
>     at ../common/NAMemory.cpp:1869
> #8  0x00007fca95a4d463 in unlinkFragment (this=0x7fca76a004c8, addr=<value 
> optimized out>)
>     at ../common/NAMemory.cpp:1957
> #9  NAHeap::deallocateHeapMemory (this=0x7fca76a004c8, addr=<value optimized 
> out>)
>     at ../common/NAMemory.cpp:3625
> #10 0x00007fca90b17aba in NodeMap::getPopularNodeNumber (this=0x7fca73b73de8, 
>     beginPos=<value optimized out>, endPos=5) at ../optimizer/NodeMap.cpp:1305
> #11 0x00007fca90bef2eb in FileScan::synthHbaseScanPhysicalProperty 
> (this=0x7fca7034e0b8, 
>     context=0x7fca7034a700, planNumber=<value optimized out>, 
> sortOrderVEG=...)
>     at ../optimizer/OptPhysRelExpr.cpp:15046
> #12 0x00007fca90bf2f70 in FileScan::synthPhysicalProperty 
> (this=0x7fca7034e0b8, 
>     myContext=0x7fca7034a700, planNumber=-1, pws=<value optimized out>)
> Root cause analysis.  During compilation for the load transform query, the 
> partition function for scans is range partitioned. The node ID field in the 
> node map for a range partitioning function is always -1.   In the method to 
> find out the most populate node for an ESP, the node Id value of -1 is used 
> to access the -1th entry in the frequency array. Hence the crash. 
> Repair: the Node Id population logic is moved to createNodeMapForHbase() and 
> all code paths to create a node map for HBase table will go through the 
> function.  In addition, a check is added to prevent writing to the -1th entry 
> in the array. 
> Workaround: turn off the CQD (set to 'off'). 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to