Github user xuchuanyin commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2037#discussion_r172756248 --- Diff: processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/UnsafeSortDataRows.java --- @@ -192,14 +196,7 @@ private void addBatch(Object[][] rowBatch, int size) throws CarbonSortKeyAndGrou unsafeInMemoryIntermediateFileMerger.startFileMergingIfPossible(); semaphore.acquire(); dataSorterAndWriterExecutorService.execute(new DataSorterAndWriter(rowPage)); - MemoryBlock memoryBlock = - UnsafeMemoryManager.allocateMemoryWithRetry(this.taskId, inMemoryChunkSize); - boolean saveToDisk = --- End diff -- FYI: Previous logic is wrong here.
---