Jackie-Jiang opened a new pull request, #16651:
URL: https://github.com/apache/pinot/pull/16651

   ## Summary
   
   This PR fixes the thread accountant setup in LeafOperator to properly handle 
resource accounting for multi-stage query execution.
   
   ## Changes
   
   - Changed from setupWorker() to setupRunner() for thread accountant 
initialization
   - Added proper cleanup with Tracing.ThreadAccountantOps.clear() in finally 
blocks
   - Treats LeafOperator threads as SSE runner anchor threads instead of worker 
threads
   - Ensures consistent thread accounting for both single table and dual table 
scenarios
   
   ## Technical Details
   
   The fix addresses thread accounting issues by:
   1. Using setupRunner with queryId and workloadName instead of setupWorker 
with taskId
   2. Adding proper resource cleanup in finally blocks to prevent resource leaks
   3. Ensuring consistent behavior between single-request and multi-request 
execution paths
   
   ## Files Changed
   
   - 
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/LeafOperator.java
   
   ## Testing
   
   - Code compiles successfully
   - Existing tests pass
   - Manual testing of multi-stage queries
   
   This change improves resource management and prevents potential 
memory/thread accounting issues in multi-stage query execution.


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