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

Indexes are not deleted after the bucket deletion when "cbindex scanAll" is running in parallel

    XMLWordPrintable

Details

    • Untriaged
    • Centos 64-bit
    • Unknown

    Description

      I was verifying --MB-23895-- when I ran into this bug.

      Steps to repro:

      1) Created a 4 node cluster kv-index-index-n1ql.

      2) Create 100 docs  and 2 indexes using the following commands.

          CREATE INDEX `index_desc` ON `beer-sample`(`state` DESC)

          CREATE INDEX `index_asc` ON `beer-sample`(`state`)

      3)  Created a shell script with following commands(1000 times maybe?)

      ....
      ....
      ./cbindex -server 10.111.150.104:8091 -auth Administrator:password -type scanAll -bucket beer-sample -limit 10000 -index index_asc
      ./cbindex -server 10.111.150.102:8091 -auth Administrator:password -type scanAll -bucket beer-sample -limit 10000 -index index_desc
       ....
       ....
      

      4) While I was running the above shell script, deleted the bucket beer-sample.

      Bucket deletion seems to have went through fine. Even index_asc index seems to have been dropped. But index_desc is not dropped even though bucket is deleted.

      When I try to drop the index now it fails with:

      [
        {
          "code": 12003,
          "msg": "Keyspace not found keyspace beer-sample - cause: No bucket named beer-sample",
          "query_from_user": "DROP INDEX `beer-sample`.index_desc;"
        }
      ]
      

       

      Output of curl command:

      [root@node2-cb450-centos7 bin]# curl -u Administrator:password 10.111.150.104:9102/getIndexStatus 
      {"code":"success","status":[{"defnId":10468474396080786011,"name":"index_desc","bucket":"beer-sample","secExprs":["`state`"],"indexType":"plasma","status":"Ready","definition":"CREATE INDEX `index_desc` ON `beer-sample`(`state` DESC)","hosts":["10.111.150.104:8091"],"completion":100,"progress":100,"scheduled":false},{"defnId":18272874543975634469,"name":"num_testing_asc","bucket":"num_testing","secExprs":["`click`"],"indexType":"plasma","status":"Ready","definition":"CREATE INDEX `num_testing_asc` ON `num_testing`(`click`)","hosts":["10.111.150.104:8091"],"completion":0,"progress":0,"scheduled":false},{"defnId":1394189830971063355,"name":"num_testing_desc","bucket":"num_testing","secExprs":["`click`"],"indexType":"plasma","status":"Ready","definition":"CREATE INDEX `num_testing_desc` ON `num_testing`(`click` DESC)","hosts":["10.111.150.102:8091"],"completion":100,"progress":100,"scheduled":false}]}[root@node2-cb450-centos7 bin]#
      

       

       

      Logs attached.

      Attachments

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

        Activity

          People

            Balakumaran.Gopal Balakumaran Gopal
            Balakumaran.Gopal Balakumaran Gopal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty