-
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
Document deletion not sync'd because user loses access to channel during deletion #1484
Comments
Action items:
|
Test channel cache version steps:
Expected: Delete sync'd to device and 1484_list_1 should disappear from list
So it's either a bug in todolite-ios or the Sync Gateway bug is present in both channel cache and distributed index mode. |
Test channel cache version steps:
Actual: 1484_list_3 never deleted from simulator (waited approx 1 min) Logs: |
Sanity tested deletes locally - worked as expected. Test details here: |
Run ToDo Lite Android against sync gateway 1.2 and DI version of SG 1.2. NOTE: ToDo Lite Android does not support the deleting the task list. |
I can reproduce what @tleyden commented. I noticed from the log that the device did push the deleted change to the sync-gateway but on the simulator, from the log, it seemed like there is no changes coming. |
What do I need to do to setup the Sync-Gateway with the same configuration on my local machine? |
Note that: deleting a task can be propagated but deleting a list cannot. Is this could be sync-function issue? |
@pasin For a local setup run Sync Gateway commit 760444c with config: https://github.com/couchbaselabs/sync-gateway-testcluster/pull/230/files -- I can help you in more detail later |
@pasin the delete seems to propagate if you delete app and do a fresh pull (though I need to retest), which means it's not a sync function issue, and that client is correctly pushing the delete |
Testing against Sync Gateway 1.1.1 (http://ec2-54-161-209-25.compute-1.amazonaws.com:4984/todolite-cc/)
Actual: 1484_list_4 never deleted from simulator (waited approx 1 min) Logs: https://gist.github.com/tleyden/71ee8520805315ed78ed If I delete the app from the simulator and re-install, it shows 1484_list_4 as being deleted. Todolite ios logs after app reinstall: https://gist.github.com/tleyden/fd338a2068d8728c2c86 |
It definitely looks like an issue in todolite-ios at this point, so closing this and leaving couchbaselabs/ToDoLite-iOS#54 open. |
I tested with Sync-Gateway 1.1.1 with https://github.com/couchbaselabs/ToDoLite-iOS/blob/master/sync-gateway-config.json, and there is NO issue about deleting the list. |
I just reopened the issue as the issue might not be at ToDoLite-iOS. |
Possibly related to #264 |
It appears the change is not being propagated because of the way the sync function is written with relation to access grants, not due to a bug in the changes processing. For example, if you listen on the port 4985 changes feed, the change will reliably make it to the changes feed. The reason the behavior is sporadic (in both 1.1.1 and 1.2.0-rc0) is due to a known race condition in the way the sync function is written, because the following things are happening concurrently inside of SG when a list document such as
If the notification happens first, the deletion will appear in the user's changes feed, otherwise it will never appear. Workaround: if the list document is deleted, explicitly grant access to the channel. Downside: this will bloat couchbase server documents with dead channels. |
- Ensure to grant the user to the list channel when the list is deleted. - Update database name from todos to todolite - Set log to * #54 and couchbase/sync_gateway#1484 (comment)
Closing as duplicate of #2005 |
Steps to reproduce:
Sg logs: https://gist.github.com/tleyden/339d9a0b5d5f8306d494
bulk get request capture from http scoop: https://gist.github.com/tleyden/b536a5dace244b4d8c7e
The text was updated successfully, but these errors were encountered: