Integrated: 1825: BotTaskAggregationHandler causes OOME

Erik Joelsson erikj at openjdk.org
Fri Feb 17 16:40:22 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.

This pull request has now been integrated.

Changeset: e1eb7e73
Author:    Erik Joelsson <erikj at openjdk.org>
URL:       https://git.openjdk.org/skara/commit/e1eb7e73276af2539d6aafa2e4f9177048a95d52
Stats:     30 lines in 3 files changed: 11 ins; 14 del; 5 mod

1825: BotTaskAggregationHandler causes OOME

Reviewed-by: ihse

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

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


More information about the skara-dev mailing list