Uploaded image for project: 'JMCF'
  1. JMCF-173

Make the BeanShell interpreter pool configurable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6.1
    • Labels:
      None
    • Internal Complexity:
      Unknown
    • Internal Value:
      Unknown

      Description

      The Calculated Custom Fields use a pool of BeanShell interpreters in order to avoid recreating them on every invocation. Unfortunately, this pool is currently hardcoded for a maximum of 24 interpreters. It should instead be configurable, for use on systems with lots of cores and/or recursive calculated field formulas.

      Parameters should be passed as Java System Properties, using -D<property-name>=<value> entries in the JVM_SUPPORT_RECOMMENDED_ARGS variable of setenv.bat/.sh. Available parameters:

      Param name Value
      jmcf.maxActive Maximum number of active Interpreters at a given time. Default value: 48
      jmcf.maxIdle Maximum number of idle Interpreters. Default value: jmcf.maxActive
      jmcf.maxWait Number of milliseconds to wait for an Interpreter to become available. Default value: 20,000 (20 seconds)

      This is mostly useful if you run into a deadlock during re-indexing, where all threads are locked in a similar manner:

      "http-bio-8443-exec-769" #2201 daemon prio=5 os_prio=0 tid=0x00007f0a200b2000 nid=0x6958 in Object.wait() [0x00007f066b7f2000]      java.lang.Thread.State: WAITING (on object monitor)      at java.lang.Object.wait(Native Method)      at java.lang.Object.wait(Object.java:502)      at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1104)      - locked <
      0x00000007bac82db0> (a org.apache.commons.pool.impl.GenericObjectPool$Latch)      at com.innovalog.jmcf.fields.AbstractCalculatedFormulaField.getValueFromIssue(AbstractCalculatedFormulaField.java:91)      at com.atlassian.jira.issue.fields.CustomFieldImpl.getJsonFromIssue(CustomFieldImpl.java:2470)      at com.atlassian.jira.rest.v2.issue.IssueBeanBuilder2.getFieldValue(IssueBeanBuilder2.java:306)      at com.atlassian.jira.rest.v2.issue.IssueBeanBuilder2.addFields(IssueBeanBuilder2.java:235)      at com.atlassian.jira.rest.v2.issue.IssueBeanBuilder2.build(IssueBeanBuilder2.java:151)
      

        Gliffy Diagrams

          Attachments

            Issue links

              Activity

                People

                • Assignee:
                  dfischer David [Innovalog]
                  Reporter:
                  dfischer David [Innovalog]
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: