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

PendingOp is not changed when index is building

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: User Error
    • CBAS DP3
    • CBAS DP3
    • analytics
    • None
    • Untriaged
    • Unknown

    Description

      based on test cases: PendingOp should be equal 1 for an index which is currently building but I don't see the progress via PendingOp

      steps:
      1) 1 data + 1 cbas node,1 bucket with 107303 items
      run the following queries without delays
      2) create index idx_city on beer_ds(city:string);
      3) connect bucket beer_sample
      4) SELECT count FROM `beer_ds`
      result:

      {'$1': 0}

      as expected, index is still not running
      5) select * from Metadata.`Index` where DatasetName='beer_ds' and IsPrimary=False

      result: PendingOp=0

      is it a bug? or my scenarios are not able to catch PendingOp=1?

      6) sleep 30 sec
      7) SELECT count FROM `beer_ds`
      result:

      {'$1': 107303}

      https://s3.amazonaws.com/bugdb/jira/MB-25695/2de1151f/172.23.105.194_logs.zip
      https://s3.amazonaws.com/bugdb/jira/MB-25695/2de1151f/172.23.106.88_logs.zip

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          If I got your steps correctly I create connection:
          connect bucket beer_sample
          and then I can't create the index

          2017-08-16 01:57:16 | INFO | MainProcess | test_thread | [cbas_base.execute_statement_on_cbas_via_rest] Running query on cbas: connect bucket beer_sample
          2017-08-16 01:57:20 | INFO | MainProcess | test_thread | [basetestcase.sleep] sleep for 30 secs.  ...
          2017-08-16 01:57:50 | INFO | MainProcess | test_thread | [cbas_base.execute_statement_on_cbas_via_rest] Running query on cbas: create index idx_city on beer_ds(city:string);
          2017-08-16 01:57:51 | ERROR | MainProcess | test_thread | [rest_client._http_request] POST http://172.23.105.194:8095/analytics/service body: {"client_context_id": null, "pretty": "true", "mode": null, "statement": "create index idx_city on beer_ds(city:string);"} headers: {'Content-Type': 'application/json', 'Accept': '*/*', 'Authorization': 'Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==\n'} error: 400 reason: unknown {
          	"requestID": "f89d046d-cebf-413c-8979-61bda29f2a2b",
          FAIL
          	"clientContextID": "null",
          	"signature": "*",
          	"errors": [{ 
          	"code": 1,
          	"msg": "Dataset Default.beer_ds is currently being fed into by the following active entities.\nDefault.beer_sample(CouchbaseMetadataExtension)\n"
          	}],
          	"status": "fatal",
          	"metrics": {
          		"elapsedTime": "34.763838ms",
          		"executionTime": "30.513087ms",
          		"resultCount": 0,
          		"resultSize": 0,
          		"errorCount": 1
          	}
          } auth: Administrator:password
          

          btw, here are my tests: http://review.couchbase.org/#/c/82245/2/pytests/cbas/cbas_secondary_indexes.py test_index_metadata(self):

          andreibaranouski Andrei Baranouski added a comment - If I got your steps correctly I create connection: connect bucket beer_sample and then I can't create the index 2017-08-16 01:57:16 | INFO | MainProcess | test_thread | [cbas_base.execute_statement_on_cbas_via_rest] Running query on cbas: connect bucket beer_sample 2017-08-16 01:57:20 | INFO | MainProcess | test_thread | [basetestcase.sleep] sleep for 30 secs. ... 2017-08-16 01:57:50 | INFO | MainProcess | test_thread | [cbas_base.execute_statement_on_cbas_via_rest] Running query on cbas: create index idx_city on beer_ds(city:string); 2017-08-16 01:57:51 | ERROR | MainProcess | test_thread | [rest_client._http_request] POST http://172.23.105.194:8095/analytics/service body: {"client_context_id": null, "pretty": "true", "mode": null, "statement": "create index idx_city on beer_ds(city:string);"} headers: {'Content-Type': 'application/json', 'Accept': '*/*', 'Authorization': 'Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==\n'} error: 400 reason: unknown { "requestID": "f89d046d-cebf-413c-8979-61bda29f2a2b", FAIL "clientContextID": "null", "signature": "*", "errors": [{ "code": 1, "msg": "Dataset Default.beer_ds is currently being fed into by the following active entities.\nDefault.beer_sample(CouchbaseMetadataExtension)\n" }], "status": "fatal", "metrics": { "elapsedTime": "34.763838ms", "executionTime": "30.513087ms", "resultCount": 0, "resultSize": 0, "errorCount": 1 } } auth: Administrator:password btw, here are my tests: http://review.couchbase.org/#/c/82245/2/pytests/cbas/cbas_secondary_indexes.py test_index_metadata(self):

          Sorry, I forgot to mention that you need to disconnect the bucket before running "create index" (so after step 3, before 4). Could you try again?

          dmitry.lychagin Dmitry Lychagin (Inactive) added a comment - Sorry, I forgot to mention that you need to disconnect the bucket before running "create index" (so after step 3, before 4). Could you try again?

          Tested, PendingOp is 1 when index is being created.

          mihir.kamdar Mihir Kamdar (Inactive) added a comment - Tested, PendingOp is 1 when index is being created.

          People

            mihir.kamdar Mihir Kamdar (Inactive)
            andreibaranouski Andrei Baranouski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty