You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "coderfender (via GitHub)" <gi...@apache.org> on 2026/06/17 07:26:44 UTC

[PR] perf: address scheduler crash on high partition SF data [datafusion-ballista]

coderfender opened a new pull request, #1875:
URL: https://github.com/apache/datafusion-ballista/pull/1875

   # 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 #https://github.com/apache/datafusion-ballista/issues/1851
   
    # 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.  
   -->
   We currently have more than what is needed in PartitionMetadata causing scheduler OOM on high cardinality data
   
   # 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.
   -->
   
   Implement PartitionLocation a lean, address-only struct instead of the full metadata:
   
     #[derive(Debug, Clone, PartialEq, Eq)]
     pub struct PartitionLocationMetadata {
         pub id: String,
         pub host: String,
         pub port: u16,
         pub grpc_port: u16,
     }
   
     pub struct PartitionLocation {
         ...
         pub executor_meta: Arc<PartitionLocationMetadata>,
     }
   
     - New From<&ExecutorMetadata> for PartitionLocationMetadata is the single place
     that maps an executor to its location address.
     - Arc-wrapped so all locations for the same executor (built in one
     partition_to_location call) share one allocation rather than N copies.
     - Proto PartitionLocation now carries only the four address fields, shrinking
     the serialized payload sent to executors/clients.
   
   
   # 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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] perf: address scheduler crash on high partition SF data [datafusion-ballista]

Posted by "coderfender (via GitHub)" <gi...@apache.org>.
coderfender commented on PR #1875:
URL: https://github.com/apache/datafusion-ballista/pull/1875#issuecomment-4728192818

   @milenkovicm please take a look whenever you get a chance 


-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] perf: address scheduler crash on high partition SF data [datafusion-ballista]

Posted by "coderfender (via GitHub)" <gi...@apache.org>.
coderfender commented on PR #1875:
URL: https://github.com/apache/datafusion-ballista/pull/1875#issuecomment-4733138785

   Yeah we had a chat in the original PR . I am okay to merge that PR ahead if that makes more sense this one. Although I think mine is a little bit different in terms of code paths changes 


-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] perf: address scheduler crash on high partition SF data [datafusion-ballista]

Posted by "coderfender (via GitHub)" <gi...@apache.org>.
coderfender commented on PR #1875:
URL: https://github.com/apache/datafusion-ballista/pull/1875#issuecomment-4735538732

   Closing this PR in favor of #1853 


-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] perf: address scheduler crash on high partition SF data [datafusion-ballista]

Posted by "milenkovicm (via GitHub)" <gi...@apache.org>.
milenkovicm commented on PR #1875:
URL: https://github.com/apache/datafusion-ballista/pull/1875#issuecomment-4732469701

   i think #1853 does that already if im not mistaken 


-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] perf: address scheduler crash on high partition SF data [datafusion-ballista]

Posted by "coderfender (via GitHub)" <gi...@apache.org>.
coderfender closed pull request #1875: perf: address scheduler crash on high partition SF data
URL: https://github.com/apache/datafusion-ballista/pull/1875


-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] perf: address scheduler crash on high partition SF data [datafusion-ballista]

Posted by "coderfender (via GitHub)" <gi...@apache.org>.
coderfender commented on code in PR #1875:
URL: https://github.com/apache/datafusion-ballista/pull/1875#discussion_r3429279609


##########
ballista/core/src/serde/scheduler/from_proto.rs:
##########
@@ -108,14 +108,19 @@ impl TryInto<PartitionLocation> for protobuf::PartitionLocation {
                     )
                 })?
                 .into(),
-            executor_meta: self
-                .executor_meta
-                .ok_or_else(|| {
+            partition_location_metadata: {
+                let m = self.executor_meta.ok_or_else(|| {
                     BallistaError::General(
                         "executor_meta in PartitionLocation is missing".to_owned(),
                     )
-                })?
-                .into(),
+                })?;
+                Arc::new(PartitionLocationMetadata {

Review Comment:
   Interesting



-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] perf: address scheduler crash on high partition SF data [datafusion-ballista]

Posted by "milenkovicm (via GitHub)" <gi...@apache.org>.
milenkovicm commented on PR #1875:
URL: https://github.com/apache/datafusion-ballista/pull/1875#issuecomment-4729944300

   thanks @coderfender will have a look 


-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] perf: address scheduler crash on high partition SF data [datafusion-ballista]

Posted by "milenkovicm (via GitHub)" <gi...@apache.org>.
milenkovicm commented on code in PR #1875:
URL: https://github.com/apache/datafusion-ballista/pull/1875#discussion_r3428078400


##########
ballista/core/src/serde/scheduler/from_proto.rs:
##########
@@ -108,14 +108,19 @@ impl TryInto<PartitionLocation> for protobuf::PartitionLocation {
                     )
                 })?
                 .into(),
-            executor_meta: self
-                .executor_meta
-                .ok_or_else(|| {
+            partition_location_metadata: {
+                let m = self.executor_meta.ok_or_else(|| {
                     BallistaError::General(
                         "executor_meta in PartitionLocation is missing".to_owned(),
                     )
-                })?
-                .into(),
+                })?;
+                Arc::new(PartitionLocationMetadata {

Review Comment:
   my idea was to have single instance of partition location and then Arc-ed behind shared pointers.  At the moment, we have instance of executor metadata per partition location which for scenarios where we have just a few executor and many partitions may produce a lot of data (id, host ...). also when serialised we would serialize executor metadata for each of partition, which is hitting gprc issues. not sure if we can somehow reduce executor metadata instance count and its serialization 



-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] perf: address scheduler crash on high partition SF data [datafusion-ballista]

Posted by "coderfender (via GitHub)" <gi...@apache.org>.
coderfender commented on PR #1875:
URL: https://github.com/apache/datafusion-ballista/pull/1875#issuecomment-4733176699

   Let me try and port out common exec information to upstream shuffle exec node 


-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] perf: address scheduler crash on high partition SF data [datafusion-ballista]

Posted by "coderfender (via GitHub)" <gi...@apache.org>.
coderfender commented on code in PR #1875:
URL: https://github.com/apache/datafusion-ballista/pull/1875#discussion_r3429473311


##########
ballista/core/src/serde/scheduler/from_proto.rs:
##########
@@ -108,14 +108,19 @@ impl TryInto<PartitionLocation> for protobuf::PartitionLocation {
                     )
                 })?
                 .into(),
-            executor_meta: self
-                .executor_meta
-                .ok_or_else(|| {
+            partition_location_metadata: {
+                let m = self.executor_meta.ok_or_else(|| {
                     BallistaError::General(
                         "executor_meta in PartitionLocation is missing".to_owned(),
                     )
-                })?
-                .into(),
+                })?;
+                Arc::new(PartitionLocationMetadata {

Review Comment:
   Would it be okay to create a followup PR to handle the second part  and port all common info in `ShuffleReaderExec` proto level and not `PartitionLocation` ?



-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org