You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/components/schemas.yaml
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -709,9 +709,14 @@ Replication:
709
709
- custom
710
710
x-enumDescriptions:
711
711
default: |-
712
-
In priority order, this will cause
712
+
For Sync Gateway versions < 4.x, in priority order, this will cause
713
713
- Deletes to always win (the delete with the longest revision history wins if both revisions are deletes)
714
714
- The revision with the longest revision history to win. This means the the revision with the most changes and therefore the highest Revision Tree ID will win.
715
+
716
+
For Sync Gateway versions >= 4.x, this will use
717
+
- Timestamp based conflict resolution (often referred to as "last write wins", or LWW). Which uses a document timestamp from most recent document revisions to compare.
718
+
- The revision with the most recent timestamp wins.
719
+
- If replicating a document that was last updated/written pre upgrade to SG 4.x, the default policy for versions < 4.x will be used.
715
720
localWins: This will result in local revisions always being the winner in any conflict.
716
721
remoteWins: This will result in remote revisions always being the winner in any conflict.
717
722
custom: This will result in conflicts going through your own custom conflict resolver. You must provide this logic as a Javascript function in the `custom_conflict_resolver` parameter.
@@ -744,6 +749,8 @@ Replication:
744
749
```
745
750
746
751
Using complex `custom_conflict_resolver` functions can noticeably degrade performance. Use a built-in resolver whenever possible.
752
+
753
+
If a document merge is being done, the `_rev` and `_cv` properties should not be included in the returned document body as Sync Gateway will generate new values for these.
0 commit comments