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

Bodies for deleted documents shouldn't be read (causes garbage data to be read)


    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.1
    • Component/s: storage-engine
    • Security Level: Public
    • Labels:
    • Environment:
      Observed on Mac and Linux platforms


      Steps to reproduce:

      1. Set up XDCR (observed when sending to ElasticSearch but not believe to be related to this)
      2. Create JSON document
      3. Observe that document is replicated as expected to remote side


      {id=2, rev=2-000015818d7d3c0a0000000000000000, expiration=0, flags=0}

      , base64=eyJjbGljayI6InRvIGVkaXQiLCJuZXcgaW4gMi4wIjoidGhlcmUgYXJlIG5vIHJlc2VydmVkIGZpZWxkIG5hbWVzIn0=}]

      in the _bulk_docs request the document appears to be JSON and the base64 data correctly represents the document

      4. Delete the document
      5. Observe that the document deletion is replicated across to remote side, but with some unusual settings:


      {id=2, rev=3-000015818d7d3c0b0000000000000000, att_reason=non-JSON mode, expiration=0, flags=0, deleted=true}

      , base64=V1QBAOAAAENfbG9jYWwvdmJzdGF0ZXsiBQdoIjogImFjdGl2ZSIsICJjaGVja3BvaW50X2lkARsAMQEWXG1heF9kZWxldGVkX3NlcW5vIjogIjAifQ==}]

      Note that the document is indicated as binary (non-JSON mode) and that the the base64 encoded data appears to be some random memory on the server:

      echo "V1QBAOAAAENfbG9jYWwvdmJzdGF0ZXsiBQdoIjogImFjdGl2ZSIsICJjaGVja3BvaW50X2lkARsAMQEWXG1heF9kZWxldGVkX3NlcW5vIjogIjAifQ==" | base64 -D

      {"h": "active", "checkpoint_id\max_deleted_seqno": "0"}
      No reviews matched the request. Check your Options in the drop-down menu of this sections header.


        No work has yet been logged on this issue.


          • Assignee:
            FilipeManana Filipe Manana (Inactive)
            mschoch Marty Schoch
          • Votes:
            0 Vote for this issue
            9 Start watching this issue


            • Created:

              Gerrit Reviews

              There are no open Gerrit changes