Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-1224

Fix build_deferred_indexes() for server versions < 6.5

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.2.6
    • None
    • None
    • None
    • 1

    Description

      In order prevent multiple network hops (one query to determine the list of deferred indexes and another query to build the deferred indexes), the following query was used to determine and build deferred indexes. However, older server versions do not seem to allow for a nested query to return a list of queries to build.

      BUILD INDEX ON `bucketName` (
        (
          SELECT RAW name FROM system:indexes 
          WHERE (keyspace_id = "bucketName" AND bucket_id IS MISSING)
              AND state = "deferred"
        )
      )
      

      Fix:
      Revert back to the 2 query method for older server versions. Keep the single query method for server versions (>= 6.5) that allow the nested query for building indexes.

      Attachments

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

        Activity

          People

            jared.casey Jared Casey
            jared.casey Jared Casey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty