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

    https://github.com/apache/carbondata/pull/2783#discussion_r221266728
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/scan/model/QueryModel.java ---
    @@ -120,7 +121,7 @@
       private boolean isFG;
     
       // whether to clear/free unsafe memory or not
    -  private boolean freeUnsafeMemory = true;
    +  private boolean freeUnsafeMemory;
    --- End diff --
    
    @xuchuanyin I think you are not clear on the purpose of this variable. 
    
    After each task completion we are freeing all memory allocated for task to 
avoid memory leak based on the task id. 
    In case of 'insert into' scenario, data load and query both will have same 
task id as they run on same thread.
    so as query will finish first, it was clearing all memory (load memory 
also). so as data loading was is in progress it was causing jvm crash. For this 
issue we added this variable to avoid freeing memory from query flow in case of 
insert into.
    
    Also end-user should not have this level control. What was the problem 
faced ? Why decided to make it a system property ?


---

Reply via email to