Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-5448

Attachments flag is dropped when applying delta to incoming rev

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 3.1.6
    • 3.1.3
    • LiteCore
    • Security Level: Public
    • None
    • 1

    Description

      When an incoming rev is a delta, `IncomingRev::parseAndInsert` can either decide to let the `Inserter` apply the delta later, or to apply the delta itself now. However, there is a crucial piece of code missing when the delta is applied immediately which means if; there are no blob changes in the delta, and the doc has existing blobs - the attachments flag is not applied to the new incoming rev.

      The fix is pretty simple: Add a check in `IncomingRev::parseAndInsert` to see if the doc has any blobs, if it does add the `kRevHasAttachments` flag to the `IncomingRev->_rev.flags`

      Attachments

        Issue Links

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

          Activity

            People

              callum.birks Callum Birks
              callum.birks Callum Birks
              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