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

Remote rev KeepBody flag could be cleared accidentally

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Boron
    • Beryllium
    • LiteCore
    • Security Level: Public
    • LiteCore 127
    • 1

    Description

      It's possible for the `keepBody` flag of a remote rev to be cleared, whenever `RevTree::keepBody` is called. This is because the function does not consider the `_remoteRevs` when clearing `kKeepBody` from the ancestor revs.
      This is an obvious logic error, and also renders delta sync entirely useless, because it needs a remote ancestor rev to compute a delta.

      The fix is simple:

      if (isLatestRemoteRevision(ancestor))
          continue;
      

      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