RFR: 1825: BotTaskAggregationHandler causes OOME

Erik Joelsson erikj at openjdk.org
Thu Feb 16 23:46:21 UTC 2023

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.


Commit messages:
 - SKARA-1825

Changes: https://git.openjdk.org/skara/pull/1477/files
 Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1477&range=00
  Issue: https://bugs.openjdk.org/browse/SKARA-1825
  Stats: 30 lines in 3 files changed: 11 ins; 14 del; 5 mod
  Patch: https://git.openjdk.org/skara/pull/1477.diff
  Fetch: git fetch https://git.openjdk.org/skara pull/1477/head:pull/1477

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

More information about the skara-dev mailing list