jtuglu-netflix opened a new issue, #17453:
URL: https://github.com/apache/druid/issues/17453

   In `QueryResultPusher#handleDruidException`, there is a codepath that can 
result in double-counting of query failure count metrics, e.g: 
`query/count/failure`.
   
   ### Affected Versions
   
   Druid 27.0.0 - Latest
   
   ### Description
   
   Failed Query Double-Counting with Non-Null ResponseWriter (e.g exception 
with partial response).
   In `QueryResultPusher#handleDruidException`, I believe there is a codepath 
that can result in double-counting of query failures. This regression seems to 
have originated from 
[this](https://github.com/apache/druid/commit/cfd07a95b7d592a333ca51597e9bbdd68e18a88a)
 commit. Prior to this, an early `return` was preventing this case, seen 
[here](https://github.com/apache/druid/blob/0efd0879a83191ac550cded6122451ba4bf91194/server/src/main/java/org/apache/druid/server/QueryResultPusher.java#L179).
 
   
   To easily reproduce:
   - As an example, run: `QueryResourceTest#testTooManyQuery` with the 
following assertions at the end of the function:
   ```java
       Assert.assertEquals(2, queryResource.getSuccessfulQueryCount());
       Assert.assertEquals(1, queryResource.getFailedQueryCount());
   ```
   Note that the test fails due to the `failedQueryCount` being incremented 
twice.


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