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

Deferred index building not idempotent

    XMLWordPrintable

Details

    Description

      I've got some demo scripts that I'm using to create a bunch of deferred indexes and then build them. Running this on a clean system works well, but when I was diagnosing issues and running the script repeatedly, I found that if any indexes already exist in the build index statement, the others are not built.

      i.e.:
      CREATE INDEX def_sourceairport ON `travel-sample`(sourceairport) USING GSI WITH

      {"defer_build":true}

      CREATE INDEX def_name_type ON `travel-sample`(name) WHERE (_type = "User") USING GSI WITH

      {"defer_build":true}

      BUILD INDEX ON `travel-sample`(`def_sourceairport`, `def_name`) USING GSI"

      then
      DROP INDEX `travel-sample`.def_name

      then the same:
      CREATE INDEX def_sourceairport ON `travel-sample`(sourceairport) USING GSI WITH

      {"defer_build":true}

      CREATE INDEX def_name_type ON `travel-sample`(name) WHERE (_type = "User") USING GSI WITH

      {"defer_build":true}

      (fails understandably)
      BUILD INDEX ON `travel-sample`(`def_sourceairport`, `def_name`) USING GSI"
      -this fails saying that def_name is already built, but def_sourceairport does not get built either-

      Attachments

        Issue Links

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

          Activity

            People

              r.kalyanasundaram Ramalingam Kalyanasundaram [X] (Inactive)
              perry Perry Krug
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty