Skip to content
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

Open
dangrieshaber opened this issue Nov 6, 2024 · 2 comments
Open

SyncFunc: oldDoc parameter is always null #7182

dangrieshaber opened this issue Nov 6, 2024 · 2 comments

Comments

@dangrieshaber
Copy link

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 state

Actual behavior

oldDoc parameter is null

Steps to reproduce

  1. Create Sync Function that checks the null-state of oldDoc parameter
  2. Update a document relevant for sync
  3. oldDoc value is null in SyncFunc
@exinarium
Copy link

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?

@torcolvin
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants