cxzl25 commented on code in PR #2423:
URL: https://github.com/apache/auron/pull/2423#discussion_r3655213616
##########
native-engine/datafusion-ext-plans/src/shuffle/rss_sort_repartitioner.rs:
##########
@@ -102,7 +107,15 @@ impl ShuffleRepartitioner for RssSortShuffleRepartitioner {
// we are likely to spill more frequently because the cost of spilling
a shuffle
// repartition is lower than other consumers.
// rss shuffle spill has even lower cost than normal shuffle
- if self.mem_used_percent() > 0.4 {
+ static PCT_THRESHOLD: OnceCell<f64> = OnceCell::new();
+ static SIZE_THRESHOLD: OnceCell<i64> = OnceCell::new();
+ let pct_threshold =
+ *PCT_THRESHOLD.get_or_init(||
conf::RSS_SPILL_MEMORY_FRACTION.value().unwrap_or(0.4));
+ let size_threshold =
+ *SIZE_THRESHOLD.get_or_init(||
conf::RSS_SPILL_MEMORY_SIZE.value().unwrap_or(0));
+ if self.mem_used_percent() > pct_threshold
+ || (size_threshold > 0 && self.mem_used() > size_threshold as
usize)
Review Comment:
Currently, we have not introduced an API similar to Spark's checkValue in
SparkAuronConfiguration and Rust's conf, so this effective check can be
completed in other PRs.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]