shizy818 commented on code in PR #14265:
URL: https://github.com/apache/iotdb/pull/14265#discussion_r1865355867


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceContext.java:
##########
@@ -649,6 +650,34 @@ public void releaseResourceWhenAllDriversAreClosed() {
     releaseResource();
   }
 
+  private void releaseTVListOwnedByQuery() {
+    for (TVList tvList : tvListSet) {
+      tvList.lockQueryList();
+      List<QueryContext> queryContextList = tvList.getQueryContextList();
+      try {
+        queryContextList.remove(this);
+        if (tvList.getOwnerQuery() == this) {
+          tvList.setOwnerQuery(null);
+          if (queryContextList.isEmpty()) {
+            LOGGER.debug(
+                "TVList {} is released by the query, FragmentInstance Id is 
{}",
+                tvList,
+                this.getId());
+            tvList.clear();

Review Comment:
   
这里应该调用memoryReservationManager.releaseMemoryCumulatively(tvList.calculateRamSize())释放查询内存



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

Reply via email to