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

Port - Attachments flag is dropped when applying delta to incoming rev

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Beryllium
    • Beryllium
    • 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

          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:

                PagerDuty