Delete document and update xattr in single operation

Description

When a document is deleted through Sync Gateway, we need to delete the document and update the mobile system xattr.  

Currently we can't do this in a single operation - the subdoc MutateIn doesn't support document delete.  When Sync Gateway does this in two operations (delete the doc, then update the xattr), there are two issues with a potential performance impact:

  1. Delete processing itself (issuing two KV ops instead of one)

  2. When Sync Gateway's initial delete comes back over the DCP feed, it looks like an SDK delete (the cas doesn't match the xattr cas), triggering Sync Gateway's import processing.  This import processing will eventually no-op when it gets a cas error attempting to re-update the xattr, so it isn't a functional issue, but it would be preferable to avoid this processing overhead altogether.

 

 

 

 

Components

Affects versions

Fix versions

Labels

Environment

None

Release Notes Description

None

Activity

CB robot May 25, 2017 at 5:53 PM

Build 5.0.0-2956 contains kv_engine commit ecd8b191e1d03674c11c857ef86423d634f62c82 with commit message:
: Add CMD_DELETE to subdoc multi mutation
https://github.com/couchbase/kv_engine/commit/ecd8b191e1d03674c11c857ef86423d634f62c82

CB robot May 24, 2017 at 5:12 PM

Build 5.0.0-2944 contains memcached commit ecd8b191e1d03674c11c857ef86423d634f62c82 with commit message:
: Add CMD_DELETE to subdoc multi mutation
https://github.com/couchbase/memcached/commit/ecd8b191e1d03674c11c857ef86423d634f62c82

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Sprint

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created April 26, 2017 at 5:24 PM
Updated May 25, 2017 at 5:53 PM
Resolved May 24, 2017 at 5:23 PM
Instabug