arturobernalg opened a new pull request, #1142: URL: https://github.com/apache/tomcat/pull/1142
The `accessCount` and `hitCount` fields in `StringCache` were declared as `int`, causing them to wrap to `Integer.MIN_VALUE` after 2,147,483,647 cache lookups on long-lived instances. This breaks JMX metrics (the exposed attribute turns negative) and any monitoring tool reading `tomcat_cache_access_total`. The fix changes both fields and their getter methods from `int` to `long`. A regression test sets the counter one below `Integer.MAX_VALUE`, performs two more cache lookups, and asserts the counter stays positive. Bugzilla: https://bz.apache.org/bugzilla/show_bug.cgi?id=70296 -- 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]
