You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by GitBox <gi...@apache.org> on 2019/01/23 10:27:17 UTC

[GitHub] kunal642 commented on a change in pull request #3095: [CARBONDATA-3265] Fixed memory leak in Range Sort

kunal642 commented on a change in pull request #3095: [CARBONDATA-3265] Fixed memory leak in Range Sort
URL: https://github.com/apache/carbondata/pull/3095#discussion_r250134938
 
 

 ##########
 File path: integration/spark-common/src/main/scala/org/apache/carbondata/spark/load/DataLoadProcessBuilderOnSpark.scala
 ##########
 @@ -127,9 +130,32 @@ object DataLoadProcessBuilderOnSpark {
       }
 
     // 4. Write
-    sc.runJob(sortRDD, (context: TaskContext, rows: Iterator[CarbonRow]) =>
+    sc.runJob(sortRDD, (context: TaskContext, rows: Iterator[CarbonRow]) => {
+      TaskContext.get.addTaskCompletionListener(_ => ThreadLocalSessionInfo.unsetAll())
 
 Review comment:
   all the changes related to ThreadLocalSessionInfo are not needed. we are already creating  ThreadLocalSessionInfo in executor side if null.
   
   Check org.apache.carbondata.spark.load.DataLoadProcessorStepOnSpark#writeFunc for reference

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services