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)

    Details

    • 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:
      None
    • Environment:
      Observed on Mac and Linux platforms

      Description

      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

      [{meta=

      {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:

      [{meta=

      {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
      WT?C_local/vbstate

      {"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.

        Activity

        mschoch Marty Schoch created issue -
        junyi Junyi Xie (Inactive) made changes -
        Field Original Value New Value
        Assignee Junyi Xie [ junyi ] Aaron Miller [ aaron ]
        junyi Junyi Xie (Inactive) made changes -
        Component/s storage-engine [ 10175 ]
        dipti Dipti Borkar made changes -
        Fix Version/s 2.0.1 [ 10399 ]
        jin Jin Lim made changes -
        Assignee Aaron Miller [ aaron ] Junyi Xie [ junyi ]
        junyi Junyi Xie (Inactive) made changes -
        Assignee Junyi Xie [ junyi ] Jin Lim [ jin ]
        junyi Junyi Xie (Inactive) made changes -
        Component/s cross-datacenter-replication [ 10136 ]
        junyi Junyi Xie (Inactive) made changes -
        Component/s couchbase-bucket [ 10173 ]
        junyi Junyi Xie (Inactive) made changes -
        Summary unknown binary data sent across XDCR during document delete persist random garbage data in doc_body for deleted items
        jin Jin Lim made changes -
        Priority Major [ 3 ] Critical [ 2 ]
        jin Jin Lim made changes -
        Assignee Jin Lim [ jin ] Filipe Manana [ filipemanana ]
        jin Jin Lim made changes -
        Planned End (re-schedule end date based on new assignee)
        junyi Junyi Xie (Inactive) made changes -
        Summary persist random garbage data in doc_body for deleted items read random garbage data in doc_body for deleted items
        FilipeManana Filipe Manana (Inactive) made changes -
        Summary read random garbage data in doc_body for deleted items Bodies for deleted documents shouldn't be read (causes garbage data to be read)
        junyi Junyi Xie (Inactive) made changes -
        Component/s couchbase-bucket [ 10173 ]
        jin Jin Lim made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes