AQL searches with 3 or more level nestiness timeout in the Assets

XMLWordPrintable

    • 6
    • Severity 3 - Minor
    • 50
    • Warranty

      Issue Summary

      If there is one Asset object that is being referenced by large number of Assets in another object types, some of the complex AQL can fail. This is a problem in data modelling on specific instance and query handling on Asset backend. Not all AQL fails. An example of the one that fails is provided in steps to reproduce. 

      Steps to Reproduce

      Assuming the following schema configuration, 

       

      The following AQL fails, 

       

      "Ownership" = "label1" OR 
      "Additional Subscription" = "label2" OR 
       OBJECT HAVING outR(objectTypeId = 51 AND 
                          OBJECT HAVING inR(objectTypeId = 52 AND 
                                             "Atlassian User" = "Accountid123", referenceType IN (Membership)), 
                         referenceType IN (Ownership, "Additional Subscription")) OR 
       OBJECT HAVING outR(objectTypeId = 43 AND KEY IN ("<Key>") AND 
                                                        OBJECT HAVING outR(objectTypeId = 51	AND OBJECT HAVING inR(objectTypeId = 52	AND 
                                                                                                   "Atlassian User" ="<Accountid123>", referenceType IN (Membership)), 
                          referenceType IN ("Link")), referenceType IN ("Group Subscription"))
      

       

       

      Expected Results

      AQL should work the same as it was working in the pre-migration systems.

      Actual Results

      Exception with 504 is returned

      Workaround

      • The same query can be rewritten as follows, 
        // code placeholder
        "Ownership" = "label1"
         OR "Additional Subscription" = "label2"
         OR OBJECT HAVING outR(objectTypeId = 51
                              AND OBJECT HAVING inR(objectTypeId = 52 AND "Atlassian User" = "<Accountid123>", referenceType IN (Membership)), referenceType IN (Ownership, "Additional Subscription"))
         OR (OBJECT HAVING outR(objectTypeId = 51
                               AND OBJECT HAVING inR(objectTypeId = 52 AND "Atlassian User" = "<Accountid123>", referenceType IN (Membership))) AND 
          OBJECT HAVING outR(objectTypeId = 433
                              AND KEY IN ("OP-1574934")
                              AND OBJECT HAVING outR(NAME IN ("<List all labels pointed to be <Group Subscription>",) AND objectTypeId = 51),referenceType IN ("Group Subscription")))

              Assignee:
              Vitaliy Kim
              Reporter:
              Kalpa Pushpakumara (Inactive)
              Votes:
              13 Vote for this issue
              Watchers:
              17 Start watching this issue

                Created:
                Updated:
                Resolved: