JackieTien97 commented on code in PR #17148:
URL: https://github.com/apache/iotdb/pull/17148#discussion_r2757658606


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/AbstractSortOperator.java:
##########
@@ -240,7 +241,9 @@ private void mergeSort() throws IoTDBException {
         mergeSortHeap.push(mergeSortKey);
       } else {
         noMoreData[readerIndex] = true;
-        sortBufferManager.releaseOneSortBranch();
+        if (sortReaders.get(readerIndex) instanceof FileSpillerReader) {
+          sortBufferManager.releaseOneSortBranch();
+        }

Review Comment:
   add a method in `SortReader`, let `FileSpillerReader`  and `MemoryReader` 
implement in different ways, and then add comments for their difference.



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