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

    
https://github.com/apache/incubator-trafodion/pull/1028#discussion_r108502509
  
    --- Diff: core/sqf/src/seatrans/tm/hbasetmlib2/hbasetm.cpp ---
    @@ -1218,6 +1220,22 @@ char* HashMapArray::get(int tid)
        return cp_val;
     }
     
    +char* HashMapArray::getRegionInfo(int64 tid)
    +{
    +   jstring js_val = (jstring)(_tlp_jenv->CallObjectMethod(javaObj_, 
JavaMethods_[JM_GET_REGINFO].methodID, tid));
    +   if (getExceptionDetails(NULL)) {
    +      tm_log_write(DTM_TM_JNI_ERROR, SQ_LOG_ERR, (char 
*)"HashMapArray::getRegionInfo()", (char *)_tlp_error_msg->c_str(), -1LL);
    +      return NULL;
    +   }
    +   if(js_val == NULL){
    +       return NULL;
    +   }
    +
    +   const jbyte* jb_val = (jbyte*)_tlp_jenv->GetStringUTFChars(js_val, 
NULL);
    --- End diff --
    
    Do we need to worry about memory leaks from C++ references to Java 
variables? I don't see any code in this module that does worry about this, but 
the executor code (see for example 
$TRAF_HOME/../sql/executor/HBaseClient_JNI.cpp) is very careful to push and pop 
frames to avoid memory leaks. Perhaps the TM is handling this issue in a 
different way?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to