When performing a GET on a document that is both compressed and has xattrs.
If the client supports compression, we can get into a situation where we uncompress the document but send it to the client with the compressed flag still set.
With a get request the document is uncompressed to allow the xattrs to be stripped before the document is sent to the client. However we do not clear the snappy datatype on the document before sending the document.
On a client that does not support compression that is OK because we set the document datatype based on the intersect of what the document datatype is and what the client supports and hence the snappy datatype is cleared. However on a client that supports compression the snappy datatype is not cleared.
This results in the server sending a document that is marked as snappy compressed but the payload is not compressed. Therefore the SDK raises an error when it attempts to decompress the payload.
|For Gerrit Dashboard: MB-34879|
|111611,1||MB-34879: Update snappy flag depending on whether payload is compressed||master||kv_engine||Status: ABANDONED||0||-1|
|111649,4||MB-34879: Ensure correct datatype for uncompressed doc with xattrs||alice||kv_engine||Status: MERGED||+2||+1|
|112199,2||Merge branch 'alice'||master||kv_engine||Status: MERGED||+2||+1|