RFR: 1191: CommitCommentWorkItem overwhelms scheduler
erikj at openjdk.java.net
Mon Sep 27 20:42:06 UTC 2021
Main goal if this patch is to fix the scheduling issue caused by CommitCommentsWorkItems::concurrentWith always returning true. To solve this a little nicer, I decided to expand on the idea I introduced a while back with PullRequest::isSame, and add the corresponding method to HostedRepository. This made implementing the ::concurrentWith methods cleaner IMO.
In addition to this, I decided to add two new gauges to the metrics collection, which would have made it much easier to discover this issue if we already had them. These gauges report the number of active and pending WorkItems we have respectively in the BotRunner, summarized per WorkItem type using labels. To achieve this as nicely as I could, I refactored the BotRunner a little bit, moving all adds and removes for the active and pending maps to specific methods.
Stats: 78 lines in 6 files changed: 59 ins; 7 del; 12 mod
Fetch: git fetch https://git.openjdk.java.net/skara pull/1223/head:pull/1223
More information about the skara-dev