Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-2679

lastComment JQL function is not scalable for enterprise

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • High
    • Resolution: Done
    • 5.2.2
    • 5.6.6
    • None
    • None
    • Sprint 60, Sprint 61, Sprint 62
    • 3
    • 9

    Description

      Hi Team,

      I'm raising this ticket on behalf of XXXXX. 

      Here is XXXXX instance statistic, four node datacenter, @20GB xmx.

      ___ Database Statistics ____________________
      
           Issues                                        : 3361594
           Projects                                      : 1385
           Custom Fields                                 : 567
           Workflows                                     : 668
           Users                                         : 39783
           Groups                                        : 11505
           Attachments                                   : 1933253
           Comments                                      : 12177867
      

      XXXXX reported multi-node crash due to OOME. from reviewing the heap dump generated upon OOME, we found lastComment function as the culprit. This function appears to load all Lucene comment documents into memory (JE: this is not the case in fact although clearly there is a problem) to perform the calculation. This array of comment is equivalent to 1.2-1.3 GB of heap memory.

      So imagine there are 10 filters running this function concurrently which a 12-13 GB memory commitment.

      Additionally, this function appears doesn't respect the Project scope given in the filter- it loads all comment despite the filter query.

      Question.

      • is this a known issue, anything you can suggest to XXXX to improve the performance of lastComment?
      • is there any similar JQL function from ScriptRunner that can potentially cause the same problem? ie. lastWatcher etc

      Best Regards,

      Vicky Kharisma
      Atlassian Premier Support

      Attachments

        Issue Links

          Activity

            People

              merdmann Marcin Erdmann [X] (Inactive)
              jechlin Jamie Echlin
              Votes:
              5 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: