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

Delete document and update xattr in single operation

    XMLWordPrintable

Details

    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.

       

       

       

       

      Attachments

        Issue Links

          For Gerrit Dashboard: MB-24098
          # Subject Branch Project Status CR V

          Activity

            People

              adamf Adam Fraser
              adamf Adam Fraser
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty