Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-57980

Internal error is observed when analytics is restarted while index is being created

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Critical
    • 7.2.1
    • 7.2.1
    • analytics
    • Enterprise Edition 7.2.1 build 5880

    Description

      To reproduce the issue:
      1. Create a bucket and load the file r.json 400 times, it will load 40K docs.
      2. Create a collection in Analytics on the above bucket.
      3. Create a secondary index 

      CREATE INDEX p ON points_tracking (UNNEST statuses SELECT cpuLoadFive:DOUBLE, storageFree:BIGINT) EXCLUDE UNKNOWN KEY;

      4. While the secondary index is being created, restart the cluster. The restart should happen before the index is created.
      5. Following error is observed 

      [
        {
          "code": 25000,
          "msg": "Internal error",
          "query_from_user": "CREATE INDEX p ON points_tracking (UNNEST statuses SELECT cpuLoadFive:DOUBLE, storageFree:BIGINT) EXCLUDE UNKNOWN KEY;"
        }
      ] 

      To ensure the index creation would take longer to build, you can use an array index for secondary index.

      Error snapshot from analytics_info.log -

      2023-07-24T05:26:35.064-07:00 WARN CBAS.server.QueryServiceServlet [HttpExecutor(port:8095)-5] handleException: unexpected exception: <ud>{"host":"172.23.100.36:8091","path":"/query/service","statement":"CREATE INDEX p ON points_tracking (UNNEST statuses SELECT cpuLoadFive:DOUBLE, storageFree:BIGINT) EXCLUDE UNKNOWN KEY;","pretty":false,"mode":"immediate","clientContextID":"30865d6e-98bb-4256-ad74-c02e1f2e7077","clientType":"ASTERIX","dataverse":null,"format":"CLEAN_JSON","timeout":9223372036854775807,"maxResultReads":1,"planFormat":"JSON","expressionTree":false,"rewrittenExpressionTree":false,"logicalPlan":false,"optimizedLogicalPlan":true,"job":false,"profile":"counts","signature":true,"multiStatement":false,"parseOnly":false,"readOnly":false,"maxWarnings":10,"sqlCompat":false,"scanConsistency":"not_bounded","scanWait":null}</ud>
      java.lang.InterruptedException: null
      	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:386) ~[?:?]
      	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096) ~[?:?]
      	at org.apache.asterix.api.http.server.NCQueryServiceServlet.executeStatement(NCQueryServiceServlet.java:98) ~[asterix-app-7.2.1-5880.jar:7.2.1-5880]
      	at com.couchbase.analytics.servlet.AnalyticsQueryServiceServlet.executeStatement(AnalyticsQueryServiceServlet.java:97) ~[cbas-server-7.2.1-5880.jar:7.2.1-5880]
      	at org.apache.asterix.api.http.server.QueryServiceServlet.handleRequest(QueryServiceServlet.java:305) ~[asterix-app-7.2.1-5880.jar:7.2.1-5880]
      	at org.apache.asterix.api.http.server.QueryServiceServlet.post(QueryServiceServlet.java:139) ~[asterix-app-7.2.1-5880.jar:7.2.1-5880]
      	at org.apache.hyracks.http.server.AbstractServlet.handle(AbstractServlet.java:94) ~[hyracks-http-7.2.1-5880.jar:7.2.1-5880]
      	at com.couchbase.analytics.servlet.AuthenticatedServlet.handle(AuthenticatedServlet.java:93) ~[cbas-server-7.2.1-5880.jar:7.2.1-5880]
      	at org.apache.hyracks.http.server.HttpRequestHandler.handle(HttpRequestHandler.java:83) ~[hyracks-http-7.2.1-5880.jar:7.2.1-5880]
      	at org.apache.hyracks.http.server.HttpRequestHandler.call(HttpRequestHandler.java:68) ~[hyracks-http-7.2.1-5880.jar:7.2.1-5880]
      	at org.apache.hyracks.http.server.HttpRequestHandler.call(HttpRequestHandler.java:37) ~[hyracks-http-7.2.1-5880.jar:7.2.1-5880]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
      	at java.lang.Thread.run(Thread.java:833) ~[?:?]

      Attachments

        1. loop.sh
          0.2 kB
        2. r.json
          5.06 MB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            wail.alkowaileet Wail Alkowaileet
            umang.agrawal Umang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty