You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2023/05/18 16:00:17 UTC

[GitHub] [arrow-datafusion] tustvold commented on a diff in pull request #6382: Account for memory usage in SortPreservingMerge (#5885)

tustvold commented on code in PR #6382:
URL: https://github.com/apache/arrow-datafusion/pull/6382#discussion_r1198000591


##########
datafusion/core/src/physical_plan/sorts/sort.rs:
##########
@@ -115,6 +120,12 @@ impl ExternalSorter {
             .with_can_spill(true)
             .register(&runtime.memory_pool);
 
+        let mut merge_reservation =
+            MemoryConsumer::new(format!("ExternalSorterMerge[{partition_id}]"))
+                .register(&runtime.memory_pool);
+
+        merge_reservation.resize(EXTERNAL_SORTER_MERGE_RESERVATION);

Review Comment:
   I take it as a positive sign that this was required to make the spill tests pass, without this the merge would exceed the memory limit and fail



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org