Csaba Ringhofer has posted comments on this change. ( https://gerrit.cloudera.org/25472 )
Change subject: IMPALA-15326: Share exchange queue memory budget ...................................................................... Patch Set 4: Code-Review+1 (1 comment) https://gerrit.cloudera.org/#/c/25472/4/fe/src/main/java/org/apache/impala/planner/ExchangeNode.java File fe/src/main/java/org/apache/impala/planner/ExchangeNode.java: https://gerrit.cloudera.org/#/c/25472/4/fe/src/main/java/org/apache/impala/planner/ExchangeNode.java@405 PS4, Line 405: // EOS releases a sender's share of the budget before draining its queue. : // Each finished queue can retain the larger of its last share or one batch. > I’d keep the estimate aligned with the current receiver and handle releasin Ack. I didn't realize at first that this new formula can also give large reduction with many senders and not too large rows, so this looks beneficial as it is. optional: what about approximating with a closed formula? This could be added to math util, moving the non-trivial math out of this class: // Returns an upper bound of the n-th harmonic number H(n) = sum(1/k, k = 1..n), // or 0 if n <= 0. Exact for n = 1 and at most ~2% above H(n) otherwise. Uses // 1/k <= ln((k + 1/2) / (k - 1/2)), which holds because 1/x is convex. public static double harmonicNumberUpperBound(long n) { if (n <= 0) return 0; return 1 + Math.log((2.0 * n + 1) / 3); } -- To view, visit https://gerrit.cloudera.org/25472 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I15be0985b45321dde9d6f0913188ef5f96088f82 Gerrit-Change-Number: 25472 Gerrit-PatchSet: 4 Gerrit-Owner: Aleksandr Efimov <[email protected]> Gerrit-Reviewer: Aleksandr Efimov <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Comment-Date: Thu, 26 Nov 2026 10:52:56 +0000 Gerrit-HasComments: Yes
