zentol commented on a change in pull request #6479: [FLINK-9969][batch] Dispose 
InMemorySorters created by the UnilateralSortMerger
URL: https://github.com/apache/flink/pull/6479#discussion_r207319672
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/operators/sort/UnilateralSortMerger.java
 ##########
 @@ -212,9 +215,39 @@ protected UnilateralSortMerger(MemoryManager 
memoryManager, List<MemorySegment>
                        TypeSerializerFactory<E> serializerFactory, 
TypeComparator<E> comparator,
                        int numSortBuffers, int maxNumFileHandles,
                        float startSpillingFraction, boolean noSpillingMemory, 
boolean handleLargeRecords,
-                       boolean objectReuseEnabled)
-       throws IOException
-       {
+                       boolean objectReuseEnabled) throws IOException {
+               this (
+                       memoryManager,
+                       memory,
+                       ioManager,
+                       input,
+                       parentTask,
+                       serializerFactory,
+                       comparator,
+                       numSortBuffers,
+                       maxNumFileHandles,
+                       startSpillingFraction,
+                       noSpillingMemory,
+                       handleLargeRecords,
+                       objectReuseEnabled,
+                       new DefaultInMemorySorterFactory<>(serializerFactory, 
comparator, THRESHOLD_FOR_IN_PLACE_SORTING));
+       }
+
+       protected UnilateralSortMerger(
 
 Review comment:
   `@VisibleForTesting`?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to