github-actions[bot] commented on code in PR #66328:
URL: https://github.com/apache/doris/pull/66328#discussion_r3691931331


##########
be/src/runtime/query_context.cpp:
##########
@@ -247,6 +247,10 @@ QueryContext::~QueryContext() {
     obj_pool.clear();
     _merge_controller_handler.reset();
 
+    if (_exec_env->spill_file_mgr()) {

Review Comment:
   [P2] Skip spill-root cleanup for queries that never spill
   
   This destructor runs for every query, but 
`delete_empty_query_spill_directories()` walks every configured spill store and 
begins each walk with a synchronous `rmdir`, even when this query never created 
a spill file. Because an empty `spill_storage_root_path` inherits all 
`storage_root_path` entries, the common no-spill path now pays one redundant 
filesystem lookup per disk at query teardown; at query-serving QPS this scales 
as O(disks), and a slow root can hold up the thread releasing the query. Please 
record spill participation/the touched `SpillDataDir` values when a spill file 
is actually created (or provide an equivalent guard) and skip this work for 
no-spill queries.
   



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