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/02 11:17:06 UTC

[GitHub] [arrow-datafusion] tustvold opened a new pull request, #6188: Cleanup join memory accounting

tustvold opened a new pull request, #6188:
URL: https://github.com/apache/arrow-datafusion/pull/6188

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #.
   
   # Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   Follow on to #6170 
   
   # What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   # Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->


-- 
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


[GitHub] [arrow-datafusion] alamb commented on pull request #6188: Cleanup join memory accounting in CrossJoin and NestedLoopsJoin

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #6188:
URL: https://github.com/apache/arrow-datafusion/pull/6188#issuecomment-1531411180

   cc @korowa 


-- 
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


[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #6188: Cleanup join memory accounting in CrossJoin and NestedLoopsJoin

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #6188:
URL: https://github.com/apache/arrow-datafusion/pull/6188#discussion_r1185036618


##########
datafusion/core/src/physical_plan/joins/nested_loop_join.rs:
##########
@@ -375,13 +370,13 @@ struct NestedLoopJoinStream {
     /// Join execution metrics
     join_metrics: BuildProbeJoinMetrics,
     /// Memory reservation for visited_left_side
-    reservation: SharedMemoryReservation,
+    reservation: MemoryReservation,
 }
 
 fn build_join_indices(
     left_index: usize,
     batch: &RecordBatch,

Review Comment:
   https://github.com/apache/arrow-datafusion/pull/6229



-- 
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


[GitHub] [arrow-datafusion] alamb merged pull request #6188: Cleanup join memory accounting in CrossJoin and NestedLoopsJoin

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #6188:
URL: https://github.com/apache/arrow-datafusion/pull/6188


-- 
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


[GitHub] [arrow-datafusion] comphead commented on a diff in pull request #6188: Cleanup join memory accounting in CrossJoin and NestedLoopsJoin

Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #6188:
URL: https://github.com/apache/arrow-datafusion/pull/6188#discussion_r1182689135


##########
datafusion/core/src/physical_plan/joins/nested_loop_join.rs:
##########
@@ -375,13 +370,13 @@ struct NestedLoopJoinStream {
     /// Join execution metrics
     join_metrics: BuildProbeJoinMetrics,
     /// Memory reservation for visited_left_side
-    reservation: SharedMemoryReservation,
+    reservation: MemoryReservation,
 }
 
 fn build_join_indices(
     left_index: usize,
     batch: &RecordBatch,

Review Comment:
   its out of the changes scope but probably we can rename too generic `batch` into something else? like right_data, or probe? 



-- 
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


[GitHub] [arrow-datafusion] korowa commented on a diff in pull request #6188: Cleanup join memory accounting in CrossJoin and NestedLoopsJoin

Posted by "korowa (via GitHub)" <gi...@apache.org>.
korowa commented on code in PR #6188:
URL: https://github.com/apache/arrow-datafusion/pull/6188#discussion_r1183282264


##########
datafusion/core/src/physical_plan/joins/nested_loop_join.rs:
##########
@@ -202,14 +198,13 @@ impl ExecutionPlan for NestedLoopJoinExec {
         let join_metrics = BuildProbeJoinMetrics::new(partition, &self.metrics);
 
         // Initialization of operator-level reservation
-        self.reservation
-            .initialize("NestedLoopJoinExec", context.memory_pool());
+        let operator_reservation =

Review Comment:
   Not sure if it's still an "operator-level" reservation as `NestedLoopJoinExec` doesn't contain this attribute anymore.



-- 
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


[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #6188: Cleanup join memory accounting in CrossJoin and NestedLoopsJoin

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #6188:
URL: https://github.com/apache/arrow-datafusion/pull/6188#discussion_r1185029043


##########
datafusion/core/src/physical_plan/joins/nested_loop_join.rs:
##########
@@ -202,14 +198,13 @@ impl ExecutionPlan for NestedLoopJoinExec {
         let join_metrics = BuildProbeJoinMetrics::new(partition, &self.metrics);
 
         // Initialization of operator-level reservation
-        self.reservation
-            .initialize("NestedLoopJoinExec", context.memory_pool());
+        let operator_reservation =

Review Comment:
   https://github.com/apache/arrow-datafusion/pull/6228 contains a proposed rewording



-- 
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


[GitHub] [arrow-datafusion] tustvold commented on a diff in pull request #6188: Cleanup join memory accounting

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on code in PR #6188:
URL: https://github.com/apache/arrow-datafusion/pull/6188#discussion_r1182413419


##########
datafusion/execution/src/memory_pool/mod.rs:
##########
@@ -175,64 +174,6 @@ impl Drop for MemoryReservation {
     }
 }
 
-pub trait TryGrow: Send + Sync + std::fmt::Debug {

Review Comment:
   As these are relatively new I figured it was easiest to just remove them, rather than go through a deprecation process



-- 
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


[GitHub] [arrow-datafusion] alamb commented on pull request #6188: Cleanup join memory accounting in CrossJoin and NestedLoopsJoin

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #6188:
URL: https://github.com/apache/arrow-datafusion/pull/6188#issuecomment-1532803864

   Thank you for the review @korowa !


-- 
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


[GitHub] [arrow-datafusion] alamb commented on pull request #6188: Cleanup join memory accounting in CrossJoin and NestedLoopsJoin

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #6188:
URL: https://github.com/apache/arrow-datafusion/pull/6188#issuecomment-1534787095

   Thank you everyone -- I will merge this PR and make a follow on with some proposed renamings


-- 
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