Uploaded image for project: 'Couchbase Gateway'
  1. Couchbase Gateway
  2. CBG-2011

[3.0.1 backport] CBL revpos handling causes attachment fetch per write for docs with attachments

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.0.1
    • None
    • SyncGateway
    • Security Level: Public
    • None
    • CBG Sprint 95, CBG Sprint 96, CBG Sprint 97
    • 1

    Description

      When pushing a mutation to a document with an attachment, CBL is setting the attachment revpos to the generation of the current revid, instead of the revision at which the attachment is added.

      This results in Sync Gateway treating the attachment as new to Sync Gateway, and results in a Sync Gateway fetching the attachment from Couchbase Server in order to generate a proveAttachment request.

      This will create a lot of unnecessary network traffic between SG and CBS for highly mutated documents with attachments.  

      In cases where the attachment is already present with matching digest on the common ancestor of the incoming revision and the active revision, proveAttachment should not be performed, regardless of revpos.  

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty