-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SyncFunc: oldDoc parameter is always null #7182
Comments
Getting the same behaviour when syncing down docs that need to compare the old doc to the new doc using the sync function. Has this received any attention as of yet? Is a fix on the way or an alternative version that I can use? |
The sync function is only run when documents are updated. You mentioning syncing down documents, but the sync function is not populated. This functionality is not generally broken in Sync Gateway 3.2.0. Can you provide database configuration and the recipe for how you are updating the documents? |
In reproducing the error, the sync function is actually executed as expected when a document is updated, e.g. from CB web UI.
|
As per https://docs.couchbase.com/sync-gateway/current/import-processing.html#operation, when importing a document from Couchbase Server the contents of If a document is updated via the REST api or a Couchbase Lite mutation, then the |
Thanks for the prompt reply. That is great pity. Any chance this might change? Our use-case is to purge documents from CB Lite when a channel was removed from a document. The basic idea is this:
|
Hi, Are you reliant on other behaviour of |
Checking any value against the old document fails as the
oldDoc
parameter is always null.Sync Gateway version
Couchbase Sync Gateway/3.2.0(514;release) CE
Operating system
Windows (all versions)
Expected behavior
oldDoc
contains a reference to the changed document in its previous stateActual behavior
oldDoc
parameter is nullSteps to reproduce
oldDoc
parameteroldDoc
value is null in SyncFuncThe text was updated successfully, but these errors were encountered: