RFR: 1825: BotTaskAggregationHandler causes OOME

Magnus Ihse Bursie ihse at openjdk.org
Fri Feb 17 10:25:48 UTC 2023


On Thu, 16 Feb 2023 23:42:48 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> The BotTaskAggregationHandler saves all log records in a list per thread and publishes them when a specific marker is detected in a record. This marker signals the end of a WorkItem run. If a large amount of log messages are generated by a single WorkItem, this can result in a very large amount of log messages being saved. We currently have a case where 18 million+ have been observed when processing the webrevs for https://github.com/openjdk/mobile/pull/16 in MailingListBridgeBot.
> 
> The irony here is that the only subclass of this abstract handler, the BotSlackHandler, throws away all log records that are lower level than what it's supposed to log, so we are saving all of these, only to log those of level SEVERE in the end. In the past, this class was also used for logging to logstash, and in that case, when we had one SEVERE log record, we actually wanted to log everything that lead up to it.
> 
> This fix makes it an option for the BotTaskAggregationHandler if it should save everything or just above the configured level, so a subclass can choose which behavior it expects. I also removed the filtering in BotSlackHandler as its no longer needed.

LGTM.

-------------

Marked as reviewed by ihse (Reviewer).

PR: https://git.openjdk.org/skara/pull/1477


More information about the skara-dev mailing list