You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2022/08/10 11:07:29 UTC
[iotdb] branch MemoryControl updated: add calculateRetainedSizeAfterCallingNext in Operator
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch MemoryControl
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/MemoryControl by this push:
new 4fc628898a add calculateRetainedSizeAfterCallingNext in Operator
4fc628898a is described below
commit 4fc628898a0087f273b36357123806fca2504079
Author: JackieTien97 <ja...@gmail.com>
AuthorDate: Wed Aug 10 19:06:59 2022 +0800
add calculateRetainedSizeAfterCallingNext in Operator
---
.../org/apache/iotdb/db/mpp/execution/operator/Operator.java | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/Operator.java b/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/Operator.java
index 7d8765eaa3..5ee15999b1 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/Operator.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/Operator.java
@@ -59,6 +59,8 @@ public interface Operator extends AutoCloseable {
* be like: long estimatedOfCurrentOperator = XXXXX; return max(estimatedOfCurrentOperator,
* child1.calculateMaxPeekMemory(), child2.calculateMaxPeekMemory(), ....)
*
+ * Each operator's MaxPeekMemory should also take retained size of each child operator into account.
+ *
* @return estimated max memory footprint that the Operator Tree(rooted from this operator) will
* use while doing its own query processing
*/
@@ -71,4 +73,13 @@ public interface Operator extends AutoCloseable {
default long calculateMaxReturnSize() {
return 0L;
}
+
+ // TODO remove the default while completing all the operators
+
+ /**
+ * @return each operator's retained size after calling its next() method
+ */
+ default long calculateRetainedSizeAfterCallingNext() {
+ return 0L;
+ }
}