Details
-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
Security Level: Public
-
None
-
CBG Sprint 82
-
5
Description
Retrieving the existing document metadata prior to calling downloadOrVerifyAttachments fixes two issues:
Inability to identify whether the oldest entry in the provided history is a common ancestor or a new revision to Sync Gateway, which adds uncertainty to the revpos calculation, resulting in unnecessary proveAttachment calls in some scenarios. Those scenarios only result in an additional proveAttachment call in the v1 case, but would result in an additional getAttachment in the v2 case.
This can also be used to identify cases where multiple instances of the same attachment are being added to a document.