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

Document corruption when storing a Snappy-compressed value to a document with XATTRs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 5.5.0
    • 5.5.0
    • memcached
    • None
    • Untriaged
    • Unknown

    Description

      When an existing document with XATTRS is replaced with a new value, we merge the XATTRs into the new value - see http://src.couchbase.org/source/xref/trunk/kv_engine/daemon/protocol/mcbp/mutation_context.cc#226-234

      However, if the new value has been Snappy-compresed by the client, we fail to decompress it before merging with the XATTRs. The effect of this is the document is essentially corrupted; it's marked as datatype=Snappy|XATTR, but only the value is Snappy-compressed, not the whole XATTR+Value. As such it cannot be correctly read.

      This as identified during testing of MB-28453, when updating test GetSetTest.TestReplaceWithXattr to support Snappy compression.

      Attachments

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

        Activity

          People

            drigby Dave Rigby (Inactive)
            drigby Dave Rigby (Inactive)
            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