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

XATTR indexes on deleted documents do no return correct results

    XMLWordPrintable

Details

    • Bug
    • Resolution: User Error
    • Major
    • 5.5.0
    • 5.5.0
    • query, secondary-index
    • None
    • Untriaged
    • Centos 64-bit
    • Unknown

    Description

      According to the feature spec:
      "We can also create index on deleted document xattrs using the with clause

      create index id2 on default(c1,meta().xattrs._sync) WITH {“xattrs_retain_deleted”:true} ;

      This can be used to retain xattrs for deleted documents.

      Select meta().xattrs._sync from default where c1 > 5;

      This should retrieve only values for deleted documents."

       

      I created 3 docs. docs are:

      { "test_doc_1": {c1:10, c2:11}

      {test_doc_2": {c1:20, c2:21}}

      {"test_doc_3": {c1:30, c2:31}}

       

      added system xattr to each doc:  _sync: {"b" :'value1'},  _sync: {"b" :'value2'},  _sync: {"b" :'value3'}

      deleted test_doc_3

      created index: 

      create index idx2 on default(c1,meta().xattrs._sync) WITH {"retain_deleted_xattr":true}

      deleted test_doc_2

      ran query:

      select meta().xattrs._sync from default where c1 > 5

      returns only the sync value for test_doc_1 when the design docs say "This should retrieve only values for deleted documents"

      Attachments

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

        Activity

          People

            korrigan.clark Korrigan Clark (Inactive)
            korrigan.clark Korrigan Clark (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty