https://bz.apache.org/bugzilla/show_bug.cgi?id=61391
Bug ID: 61391
Summary: SlowQueryReport not logging Failed Query if connection
abandoned
Product: Tomcat 8
Version: 8.5.x-trunk
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ----
In SlowQueryReport.reportFailedQuery() a change has been made to check if
QueryStats is null before calling QueryStats.failure(). However, the logging is
also included in this if block.
The logging should happen regardless of whether QueryStats is null or not, so
that the SQL is logged.
Current code:
QueryStats qs = this.getQueryStats(sql);
if (qs != null) {
qs.failure(delta, now);
if (isLogFailed() && log.isWarnEnabled()) {
log.warn("Failed Query Report SQL="+sql+"; time="+delta+" ms;");
}
}
Suggested fix:
QueryStats qs = this.getQueryStats(sql);
if (qs != null) {
qs.failure(delta, now);
}
if (isLogFailed() && log.isWarnEnabled()) {
log.warn("Failed Query Report SQL="+sql+"; time="+delta+" ms;");
}
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]