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

If document is deleted with query and then KV, this should fail

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.0.0
    • Cheshire-Cat
    • query
    • Untriaged
    • 1
    • Unknown

    Description

      The test is:

      collection.upsert(docId, initial);
       
      TransactionResult r = transactions.run((ctx) -> {
          TransactionGetResult gr = ctx.get(collection, docId);
       
          QueryResult qr = ctx.query("DELETE FROM `default` WHERE META().id = '" + docId + "'");
       
          ctx.remove(gr);
      }); 

      So:

      • Get an existing document with KV.
      • Delete that same document with query.
      • Remove that document with KV, with txdata:

      {"scas":"1604575189310177280","kv":true} 

      This removal returns no errors.  With KV this should return a "document not found" type error.

      (If I put the ctx.get after the ctx.query, then the ctx.get does fail with 17014 "document not found" as I'd expect).

      Attachments

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

        Activity

          People

            kamini.jagtiani Kamini Jagtiani
            graham.pople Graham Pople
            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