Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-11008

When inheritance is used on Insight Object Types the system can be slow to execute IQL searches

      Atlassian Update – 17 March 2022

      Hi everyone,

      We are pleased to let you know that a bug fix for the import performance regression is now available in Jira Service Management Data Center versions 4.20.7, 4.22.1 and the Insight Marketplace app version 8.9.10.

      This performance fix increases the import speed when there are object type hierarchies in the schemas. We’ve seen some significant improvements and look forward to having customers put it to use!

      We're initially releasing the fix behind a feature flag for early adopters to experiment with. We’re ready to provide a rollback for you if anything unexpected occurs. Follow the instructions below to enable the flag.

      Kind regards,

      Craig Shannon

      Jira Service Management, Data Center & Server

      Instructions to enable the feature flags in 4.20.7 / 4.22.1

      There are two feature flags which will turn on this new behavior:

      insight.index.object.type.children

      insight.index.object.type.reindex.on.failure

      To activate them, see Enable Dark Feature in Jira.

      Once you enable those feature flags, you need to run a reindex as the object type structure in the index changes to improve the lookup performance of the object type hierarchy. You can do it from <JIRA URL>/secure/admin/InsightPluginShowIndex.jspa. Make sure to do a clean reindex to ensure that the old object type index file on disk is removed.

      If you encounter any issues, disabling the feature flags will revert back the behavior and there is no need to perform a reindex again.

      Issue Summary

      It has been noticed that when object types are using inheritance, Insight can be slow to execute searches due to the number of objects and types causing a large search to find all descendents. 

      Customers would see a stack trace similar to the one below finding children or all object types:

      com.google.common.cache.LocalCache$Segment.getEntry(LocalCache.java:2673)
      com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2027)
      com.google.common.cache.LocalCache.get(LocalCache.java:3952)
      com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974)
      com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4958)
      io.riada.insight.index.model.InsightIndexBase.load(InsightIndexBase.java:69)
      io.riada.insight.index.model.ObjectTypeIndexImpl.loadObjectType(ObjectTypeIndexImpl.java:41)
      io.riada.insight.index.model.ObjectTypeIndexImpl.findAllObjectTypes(ObjectTypeIndexImpl.java:48)
      io.riada.insight.index.filter.ObjectTypeFilterImpl.findObjectTypeChildrens(ObjectTypeFilterImpl.java:68)
      io.riada.insight.index.filter.ObjectTypeFilterImpl.findObjectTypeDescendants(ObjectTypeFilterImpl.java:80)
      io.riada.insight.index.filter.ObjectTypeFilterImpl.findObjectTypeDescendants(ObjectTypeFilterImpl.java:82)
      io.riada.insight.index.filter.ObjectTypeFilterImpl.findObjectTypeDescendants(ObjectTypeFilterImpl.java:82) 

      Steps to Reproduce

      1. Create an Insight schema with several object types
      2. Add some inheritance hierarchies to the object types
      3. Create an attribute on the parent object (A) which is inherited by child objects
      4. Create an attribute on object B which is an inherited attribute from object A
      5. Populate the schema with objects
      6. Search using inbound or outbound references and you will noticed a performance degradation when there is inheritance in the schema

      Expected Results

      Performance should not degrade due to the inheritance on object types. 

      Actual Results

      Performance degrades as more objects and object types are added to the schemas in order to search and find all descendents.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

          Form Name

            [JSDSERVER-11008] When inheritance is used on Insight Object Types the system can be slow to execute IQL searches

            Craig Shannon made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 726338 ]
            Mateusz Beczek made changes -
            Status Original: Closed [ 6 ] New: Closed [ 6 ]
            Charlie Marriott made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 628053 ]
            Charlie Marriott made changes -
            Description Original: h3. Issue Summary

            It has been noticed that when object types are using inheritance, Insight can be slow to execute searches due to the number of objects and types causing a large search to find all descendents. 

            Customers would see a stack trace similar to the one below finding children or all object types:
            {code:java}
            com.google.common.cache.LocalCache$Segment.getEntry(LocalCache.java:2673)
            com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2027)
            com.google.common.cache.LocalCache.get(LocalCache.java:3952)
            com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974)
            com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4958)
            io.riada.insight.index.model.InsightIndexBase.load(InsightIndexBase.java:69)
            io.riada.insight.index.model.ObjectTypeIndexImpl.loadObjectType(ObjectTypeIndexImpl.java:41)
            io.riada.insight.index.model.ObjectTypeIndexImpl.findAllObjectTypes(ObjectTypeIndexImpl.java:48)
            io.riada.insight.index.filter.ObjectTypeFilterImpl.findObjectTypeChildrens(ObjectTypeFilterImpl.java:68)
            io.riada.insight.index.filter.ObjectTypeFilterImpl.findObjectTypeDescendants(ObjectTypeFilterImpl.java:80)
            io.riada.insight.index.filter.ObjectTypeFilterImpl.findObjectTypeDescendants(ObjectTypeFilterImpl.java:82)
            io.riada.insight.index.filter.ObjectTypeFilterImpl.findObjectTypeDescendants(ObjectTypeFilterImpl.java:82) {code}
            h3. Steps to Reproduce
             # Create an Insight schema with several object types
             # Add some inheritance hierarchies to the object types
             # Create an attribute on the parent object (A) which is inherited by child objects
             # Create an attribute on object B which is an inherited attribute from object A
             # Populate the schema with objects
             # Search using inbound or outbound references and you will noticed a performance degradation when there is inheritance in the schema

            h3. Expected Results

            Performance should not degrade due to the inheritance on object types. 
            h3. Actual Results

            Performance degrades as more objects and object types are added to the schemas in order to search and find all descendents.
            h3. Workaround

            Currently there is no known workaround for this behavior. A workaround will be added here when available
            New: {panel:title=Atlassian Update – 17 March 2022|borderStyle=solid|borderColor=#ebf2f9|titleBGColor=#ebf2f9|bgColor=#ebf2f9}
            Hi everyone,

            We are pleased to let you know that a bug fix for the import performance regression is now available in Jira Service Management Data Center versions 4.20.7, 4.22.1 and the Insight Marketplace app version 8.9.10.

            This performance fix increases the import speed when there are object type hierarchies in the schemas. We’ve seen some significant improvements and look forward to having customers put it to use!

            We're initially releasing the fix behind a feature flag for early adopters to experiment with. We’re ready to provide a rollback for you if anything unexpected occurs. Follow the instructions below to enable the flag.

            Kind regards,

            Craig Shannon

            Jira Service Management, Data Center & Server

            *Instructions to enable the feature flags in 4.20.7 / 4.22.1*

            There are two feature flags which will turn on this new behavior:

            {{insight.index.object.type.children}}

            {{insight.index.object.type.reindex.on.failure}}

            To activate them, see [Enable Dark Feature in Jira|https://confluence.atlassian.com/jirakb/enable-dark-feature-in-jira-959286331.html].

            Once you enable those feature flags, you need to run a reindex as the object type structure in the index changes to improve the lookup performance of the object type hierarchy. You can do it from <JIRA URL>/secure/admin/InsightPluginShowIndex.jspa. Make sure to do a clean reindex to ensure that the old object type index file on disk is removed.

            If you encounter any issues, disabling the feature flags will revert back the behavior and there is no need to perform a reindex again.
            {panel}
            h3. Issue Summary

            It has been noticed that when object types are using inheritance, Insight can be slow to execute searches due to the number of objects and types causing a large search to find all descendents. 

            Customers would see a stack trace similar to the one below finding children or all object types:
            {code:java}
            com.google.common.cache.LocalCache$Segment.getEntry(LocalCache.java:2673)
            com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2027)
            com.google.common.cache.LocalCache.get(LocalCache.java:3952)
            com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974)
            com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4958)
            io.riada.insight.index.model.InsightIndexBase.load(InsightIndexBase.java:69)
            io.riada.insight.index.model.ObjectTypeIndexImpl.loadObjectType(ObjectTypeIndexImpl.java:41)
            io.riada.insight.index.model.ObjectTypeIndexImpl.findAllObjectTypes(ObjectTypeIndexImpl.java:48)
            io.riada.insight.index.filter.ObjectTypeFilterImpl.findObjectTypeChildrens(ObjectTypeFilterImpl.java:68)
            io.riada.insight.index.filter.ObjectTypeFilterImpl.findObjectTypeDescendants(ObjectTypeFilterImpl.java:80)
            io.riada.insight.index.filter.ObjectTypeFilterImpl.findObjectTypeDescendants(ObjectTypeFilterImpl.java:82)
            io.riada.insight.index.filter.ObjectTypeFilterImpl.findObjectTypeDescendants(ObjectTypeFilterImpl.java:82) {code}
            h3. Steps to Reproduce
             # Create an Insight schema with several object types
             # Add some inheritance hierarchies to the object types
             # Create an attribute on the parent object (A) which is inherited by child objects
             # Create an attribute on object B which is an inherited attribute from object A
             # Populate the schema with objects
             # Search using inbound or outbound references and you will noticed a performance degradation when there is inheritance in the schema

            h3. Expected Results

            Performance should not degrade due to the inheritance on object types. 
            h3. Actual Results

            Performance degrades as more objects and object types are added to the schemas in order to search and find all descendents.
            h3. Workaround

            Currently there is no known workaround for this behavior. A workaround will be added here when available
            Charlie Marriott made changes -
            Link New: This issue is related to JSDSERVER-8451 [ JSDSERVER-8451 ]
            Craig Shannon made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: In Progress [ 3 ] New: Closed [ 6 ]
            Craig Shannon made changes -
            Fix Version/s New: 4.22.1 [ 99890 ]
            Fix Version/s New: 4.20.7 [ 99895 ]
            Fix Version/s New: Insight 8.9.10 [ 100295 ]
            SET Analytics Bot made changes -
            UIS Original: 40 New: 41
            Bugfix Automation Bot made changes -
            Support reference count Original: 3 New: 4
            SET Analytics Bot made changes -
            UIS Original: 41 New: 40

              Unassigned Unassigned
              01656e440512 Craig Shannon
              Affected customers:
              2 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: