Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion docs/api/components/schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -709,9 +709,14 @@
- custom
x-enumDescriptions:
default: |-
In priority order, this will cause
For Sync Gateway versions < 4.x, in priority order, this will cause
- Deletes to always win (the delete with the longest revision history wins if both revisions are deletes)
- 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.

Check failure on line 715 in docs/api/components/schemas.yaml

View workflow job for this annotation

GitHub Actions / yamllint

715:1 [trailing-spaces] trailing spaces

Check failure on line 715 in docs/api/components/schemas.yaml

View workflow job for this annotation

GitHub Actions / yamllint

715:1 [trailing-spaces] trailing spaces
For Sync Gateway versions >= 4.x, this will use
- 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.
- The revision with the most recent timestamp wins.
- 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.
localWins: This will result in local revisions always being the winner in any conflict.
remoteWins: This will result in remote revisions always being the winner in any conflict.
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.
Expand Down Expand Up @@ -744,6 +749,8 @@
```

Using complex `custom_conflict_resolver` functions can noticeably degrade performance. Use a built-in resolver whenever possible.

Check failure on line 752 in docs/api/components/schemas.yaml

View workflow job for this annotation

GitHub Actions / yamllint

752:1 [trailing-spaces] trailing spaces

Check failure on line 752 in docs/api/components/schemas.yaml

View workflow job for this annotation

GitHub Actions / yamllint

752:1 [trailing-spaces] trailing spaces
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.

This is an Enterprise Edition only feature.
type: string
Expand Down
Loading