Uploaded image for project: 'Atlassian Intelligence'
  1. Atlassian Intelligence
  2. AI-394

CQL search giving 500 called by CQ on Hello

    XMLWordPrintable

Details

    • Severity 3 - Minor

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lhou1 Lorien Hou
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: