yiguolei commented on code in PR #33229:
URL: https://github.com/apache/doris/pull/33229#discussion_r1549804799


##########
be/src/pipeline/pipeline_x/dependency.cpp:
##########
@@ -267,11 +267,21 @@ void AggSpillPartition::close() {
 }
 
 void PartitionedAggSharedState::close() {
+    if (is_closed) {
+        return;
+    }
+    is_closed = true;
     for (auto partition : spill_partitions) {
         partition->close();
     }
+    spill_partitions.clear();
 }
-void SpillSortSharedState::clear() {
+
+void SpillSortSharedState::close() {
+    if (is_closed) {
+        return;
+    }
+    is_closed = true;
     for (auto& stream : sorted_streams) {

Review Comment:
   可能不需要这个函数,我们不论正常退出,还是异常退出,都可以依赖 spillstream shared ptr 析构的时候,自动删除相关的文件。



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to