Presto: Some queries that end in User Error cause queuedQueries metric to be inaccurate

Created on 23 Jun 2020  路  3Comments  路  Source: prestodb/presto

I recently discovered that the queued queries metric reported through JMX by our Presto cluster is wildly inaccurate: reported value of nearly 4k when the Cluster Overview UI shows 0 queued queries.

After a restart to zero it out, it seems like the inaccuracies in reported queuedQueries value track with queries that end in User Error. Looking at the source, it seems plausible that the query was cancelled before it triggered the queryStarted() method of QueryManagerStats, and thus the counter is not getting decremented.

Please let me know if I can be of any further help in addressing this problem
Screen Shot 2020-06-23 at 11 40 55 AM

bug

All 3 comments

@jeremy-degroot thanks, this is indeed a bug. Do you want to submit a pull request to fix this issue?

Yes, I'd be interested in trying to fix it.
This would be my first Presto contribution, anything I should know aside from what's in the community guidelines and README before I attempt it?

@jeremy-degroot nope, that covers it.

Was this page helpful?
0 / 5 - 0 ratings