Uploaded image for project: 'Skara'
  1. Skara
  2. SKARA-2386

PullRequestBotFactory creates too many IssueBots

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.0
    • None
    • bots
    • None

      The PullRequestBotFactory tries to create a single IssueBot@<project> bot instance per IssueProject found. Unfortunately, due to how it's using maps, and that configuration::issueProject always returns a new instance, it ends up creating lots of duplicates.

      These duplicates haven't affected anything functionally as far as I can tell, but are quite detrimental to performance, especially if large bulk updates are done in JBS.

      I think the best fix here is to avoid relying on IssueProject implementing a good hashcode method and start explicitly caching instances of IssueProject in a separate `Map<String, IssueProject>` map in the factory to avoid having multiple equivalent instances around.

            zsong Zhao Song
            erikj Erik Joelsson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: