You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "satwik-pachigolla (via GitHub)" <gi...@apache.org> on 2025/02/13 20:07:14 UTC

[I] [Multistage] Improve Observability for Diagnosing Performance of Multistage Engine Queries [pinot]

satwik-pachigolla opened a new issue, #15057:
URL: https://github.com/apache/pinot/issues/15057

   Observability to diagnose performance of the multistage engine queries is lacking. On separate occasions, we observed latency spikes and timeouts for multistage engine queries for a brief period of time. There aren't enough useful logs or metrics to pinpoint which instance(s) is taking longer retrospectively.
   
   Some specific gaps:
   - Query failures [without metrics](https://github.com/apache/pinot/blob/master/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java#L331-L336)
   - No logs or stats in response metadata that can be used to identify slow instances in any stage of executing a query. Or no way of correlating broker request IDs to the logs or stats. 
   - Timeouts are difficult to diagnose without taking an approach such as increasing the timeout, rerunning, and then profiling the query but once again that does not enable retrospective debugging. All that is available retrospectively are a high volume of logs across many instances such as:
   ```
   Caught exception while processing query
   [2025-02-01 10:33:42.386841] java.util.concurrent.TimeoutException: Timed out while offering data to mailbox
   ```
   these logs do not provide further useful information.
   
   While all the above observations seem to be unchanged in the latest version as of this posting, these observations were from Pinot version https://github.com/apache/pinot/commit/17332dea90183323f1eb3f1d15f01ddfdf94beee which is very slightly ahead of the 1.2 release version.


-- 
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: commits-unsubscribe@pinot.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] [Multistage] Improve Observability for Diagnosing Performance of Multistage Engine Queries [pinot]

Posted by "satwik-pachigolla (via GitHub)" <gi...@apache.org>.
satwik-pachigolla commented on issue #15057:
URL: https://github.com/apache/pinot/issues/15057#issuecomment-3181194213

   @gortiz Thanks for all the work here. I think the initial asks pointed out in this ticket are addressed and if we find any more gaps we can file new issues for them.


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] [Multistage] Improve Observability for Diagnosing Performance of Multistage Engine Queries [pinot]

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on issue #15057:
URL: https://github.com/apache/pinot/issues/15057#issuecomment-2657839089

   @gortiz Can you help take a look at this? Have you already made some improvements in 1.3 release?


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] [Multistage] Improve Observability for Diagnosing Performance of Multistage Engine Queries [pinot]

Posted by "gortiz (via GitHub)" <gi...@apache.org>.
gortiz commented on issue #15057:
URL: https://github.com/apache/pinot/issues/15057#issuecomment-3150085110

   Hi there! We have improved o11y in MSE during the last months:
   
   > Query failures [without metrics]
   
   We centralized the place where errors are reported in MSE: Now it is done in https://github.com/apache/pinot/blob/a09d01faae93e5156884d9429decdd43aa8f5582/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java#L252
   
   > No logs or stats in response metadata that can be used to identify slow instances in any stage of executing a query. Or no way of correlating broker request IDs to the logs or stats.
   
   A bit of good and a bit of bad here. Originally, MSE stats were only collected when queries successfully finish, but we are now able to collect them when the query fails. The bad is:
   1. When a query fails, it aborts the execution, so the stats returned only contain information of what was executed so far.
   2. The stats are not going to be helpful to find slow instances because they are aggregated by stage, not by instance.
   
   > Timeouts are difficult to diagnose without taking an approach such as increasing the timeout, rerunning, and then profiling the query but once again that does not enable retrospective debugging. All that is available retrospectively are a high volume of logs across many instances such as:
   
   This is fixed. Now that the stats are returned along with the error, you should be able to see where the time was spent.
   
   The logs are now enriched with the correlation id of the query (called cid) and the stage. These properties are added to the slf4j context and are printed in the default log4j2.xml provided with Pinot. In case you use your custom log4j2.xml, you will need to modify your pattern to include the cid and the stage. You can get inspiration from https://github.com/apache/pinot/blob/a09d01faae93e5156884d9429decdd43aa8f5582/pinot-tools/src/main/resources/log4j2.xml#L31


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] [Multistage] Improve Observability for Diagnosing Performance of Multistage Engine Queries [pinot]

Posted by "dang-stripe (via GitHub)" <gi...@apache.org>.
dang-stripe commented on issue #15057:
URL: https://github.com/apache/pinot/issues/15057#issuecomment-3142179852

   > Query failures [without metrics](https://github.com/apache/pinot/blob/d691befa84ea425f0190bb7322545146dbf8c98b/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java#L495-L500)
   
   this seems to have mostly been covered in https://github.com/apache/pinot/pull/15277 and some of the other work in https://github.com/apache/pinot/issues/14950. @Jackie-Jiang confirmed that the catch all query execution block emits a processing exception metric in the onFailedRequest hook: https://github.com/apache/pinot/blob/62c75763944aeacfce1bd8eef7ce9a2087c5d612/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java#L200 which should cover the example.
   
   > No logs or stats in response metadata that can be used to identify slow instances in any stage of executing a query. Or no way of correlating broker request IDs to the logs or stats.
   
   this is now covered by https://github.com/apache/pinot/pull/15180
   
   > Timeouts are difficult to diagnose without taking an approach such as increasing the timeout, rerunning, and then profiling the query but once again that does not enable retrospective debugging
   
   i think @Jackie-Jiang and @gortiz have mentioned that the stage stats are the primary debugging mechanism for this. we're working on archiving them now after query processing to enable retrospective debugging.
   


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] [Multistage] Improve Observability for Diagnosing Performance of Multistage Engine Queries [pinot]

Posted by "dang-stripe (via GitHub)" <gi...@apache.org>.
dang-stripe commented on issue #15057:
URL: https://github.com/apache/pinot/issues/15057#issuecomment-3128832828

   @Jackie-Jiang @gortiz I've lost track of what's addressed from this ticket and what isn't. Could you help us understand what is and isn't fixed? I think @satwik-pachigolla updated the first bullet recently and found that the catch all case doesn't have a corresponding metric right now.


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] [Multistage] Improve Observability for Diagnosing Performance of Multistage Engine Queries [pinot]

Posted by "satwik-pachigolla (via GitHub)" <gi...@apache.org>.
satwik-pachigolla closed issue #15057: [Multistage] Improve Observability for Diagnosing Performance of Multistage Engine Queries
URL: https://github.com/apache/pinot/issues/15057


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org