• Severity 3 - Minor

      Issue Summary

      Environment

      Hello, or any instance with number of spaces that user has permission to add CQ to exceeding 1024.

      Steps to Reproduce

      1. Open CQ on Hello
      2. Click Ask a Question

      Expected Results

      No error on the page, User should also be able to see Question Space dropdown pre-populated with a list of spaces.

      Actual Results

      Popup error saying Something went wrong (attached img)

       

      Because CQL search is giving 500:

      https://hello.atlassian.net/wiki/rest/api/search?cql=type%3D%22space%22%20AND%20space%20in%20recentlyViewedSpaces(6)%20AND%20space%20in%20spacesWithCreatePermission(%22ac%3Acom.atlassian.confluence.plugins.confluence-questions%3Aquestion%22)&_r=1557965408709
      {"statusCode":500,"data":
      {"authorized":false,"valid":true,"errors":[],"successful":false}
      ,"message":"com.atlassian.confluence.api.service.exceptions.ServiceException: Exception executing cql as async search: type=\"space\" AND space in recentlyViewedSpaces(6) AND space in spacesWithCreatePermission(\"ac:com.atlassian.confluence.plugins.confluence-questions:question\")"}
      

       

      Error seen in splunk:

      ...
      Caused by: org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed
      com.atlassian.confluence.impl.search.elasticsearch.rest.ResponseErrorParser.handleSearchPhaseExecutionException(ResponseErrorParser.java:80)
      com.atlassian.confluence.impl.search.elasticsearch.rest.ResponseErrorParser.parseErrorResponse(ResponseErrorParser.java:51)
      com.atlassian.confluence.impl.search.elasticsearch.rest.ESRestClient.handleErrorResponse(ESRestClient.java:369)
      com.atlassian.confluence.impl.search.elasticsearch.rest.ESRestClient.parseSearchResponse(ESRestClient.java:302)
      com.atlassian.confluence.impl.search.elasticsearch.rest.ESRestClient.doSearch(ESRestClient.java:259)
      com.atlassian.confluence.impl.search.elasticsearch.rest.RestActionFuture.lambda$new$0(RestActionFuture.java:23)
      com.google.common.base.Suppliers$MemoizingSupplier.get(Suppliers.java:131)
      com.atlassian.confluence.impl.search.elasticsearch.rest.RestActionFuture.actionGet(RestActionFuture.java:28)
      com.atlassian.confluence.impl.search.elasticsearch.ESAsyncSearchCommand.run(ESAsyncSearchCommand.java:80)
      com.atlassian.confluence.impl.search.elasticsearch.ESAsyncSearchCommand.run(ESAsyncSearchCommand.java:43)
      com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:302)
      com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:298)
      rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:46)
      ... 29 more
      
      Caused by: org.elasticsearch.ElasticsearchException: too_many_clauses:too_many_clauses: maxClauseCount is set to 1024
      com.atlassian.confluence.impl.search.elasticsearch.rest.ResponseErrorParser.handleOtherException(ResponseErrorParser.java:113)
      com.atlassian.confluence.impl.search.elasticsearch.rest.ResponseErrorParser.parseErrorResponse(ResponseErrorParser.java:61)
      com.atlassian.confluence.impl.search.elasticsearch.rest.ResponseErrorParser.handleShardSearchFailure(ResponseErrorParser.java:93)
      com.atlassian.confluence.impl.search.elasticsearch.rest.ResponseErrorParser.lambda$handleShardSearchFailures$0(ResponseErrorParser.java:88)
      java.lang.Iterable.forEach(Iterable.java:75)
      com.atlassian.confluence.impl.search.elasticsearch.rest.ResponseErrorParser.handleShardSearchFailures(ResponseErrorParser.java:88)
      ... 42 more	
      

      Notes

      (Optional - If Necessary)

      Workaround

      Required, if there is no workaround please state:
      Currently there is no known workaround for this behavior. A workaround will be added here when available

            [AI-394] CQL search giving 500 called by CQ on Hello

            Matt added a comment -

            It's 2024 and this is still not resolved. C'mon Atlassian, QUIT CLOSING THINGS AND JUST FIX SOMETHING!!!!!!!!

            AI-913 Using SpacesWithCreatePermission in CQL can cause 500 Internal Server Error - Create and track feature requests for Atlassian products.

            Matt added a comment - It's 2024 and this is still not resolved. C'mon Atlassian, QUIT CLOSING THINGS AND JUST FIX SOMETHING!!!!!!!! AI-913 Using SpacesWithCreatePermission in CQL can cause 500 Internal Server Error - Create and track feature requests for Atlassian products.
            pqz made changes -
            Component/s Original: Search - Core [ 46383 ]
            Component/s Original: Integrations - Confluence Questions [ 46366 ]
            Component/s Original: Ecosystem - API Framework [ 46317 ]
            Component/s Original: Ecosystem [ 49196 ]
            Component/s New: Search - Core [ 75296 ]
            Component/s New: Admin Experience [ 74216 ]
            Component/s New: Admin Experience [ 74216 ]
            Component/s New: Admin Experience [ 74216 ]
            Key Original: CONFCLOUD-66588 New: AI-394
            QA Demo Status Original: Not Done [ 14330 ]
            QA Kickoff Status Original: Not Done [ 14234 ]
            Support reference count Original: 1
            Project Original: Confluence Cloud [ 18513 ] New: Atlassian Intelligence [ 23110 ]
            Max Henash (Inactive) made changes -
            Link New: This issue is duplicated by CONFDEV-68096 [ CONFDEV-68096 ]
            Alice Wang (Inactive) made changes -
            Resolution New: Tracked Elsewhere [ 15 ]
            Status Original: Gathering Impact [ 12072 ] New: Closed [ 6 ]
            Dasha made changes -
            Remote Link Original: This issue links to "Page (Pug)" [ 449462 ]
            Dasha made changes -
            Remote Link Original: This issue links to "Page (Pug)" [ 449462 ]
            Dasha made changes -
            Remote Link New: This issue links to "Page (Pug)" [ 449462 ]
            Jane Rumiantseva made changes -
            Labels Original: CQL core-experience q1-19-cc-ecosystem soft-serve New: CQL core-experience grooming-ready q1-19-cc-ecosystem soft-serve
            Supreet (Inactive) made changes -
            Link New: This issue was cloned as CONFCLOUD-67763 [ CONFCLOUD-67763 ]
            Michael Andreacchio made changes -
            Status Original: Needs Triage [ 10030 ] New: Gathering Impact [ 12072 ]

              Unassigned Unassigned
              lhou1 Lorien Hou
              Affected customers:
              0 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: