-
Notifications
You must be signed in to change notification settings - Fork 138
-
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
Functional behavior of _removed
revisions
#927
Comments
Also related to #264. |
Hi Guys, I hope you do not mind me jumping in here. #264 was raised by us (SafetyCulture). jnordberg has moved to another company since then. We are very much in need of documents to be completely removed from mobile devices when the user loses access to a channel or when a document is removed from a channel. Are you considering implementing this behaviour? If I understand correctly, the current behaviour is that documents are left on the device. They are not updated with latest revisions, but are not removed. We would like them to be removed. |
After reviewing with the team, the fix for this issue will be as follows: To restate the problem: Currently, when Sync Gateway identifies as revision as being removed for a user, it sends a Sample use case:
Instead, SG should do the following at step 4:
This doesn't address the scenario where users lose channel access - that's still going to be tracked with #264. |
Thanks for the update, Adam. Sorry, I did not mean to derail this issue. |
@pasin identified a scenario that's not covered by the above - where a client is the originator of the revision that causes them to lose access, and so they already have a local copy of 2-def. That client will still pull the new 2-ghi, but the already-existing 2-def will be treated as the winning revision by the client. Needs further discussion to identify how to handle this case. |
After followup review with the team, the issue discussed in the previous comment (users making a change that would revoke access to a revision they created) will need to be addressed in future, potentially as part of #264. Implementation notes on this issue:
However, there's a tricky scenario needs to be considered and handled:
We're already doing some merge handling of the 'removed' properties (https://github.com/couchbase/sync_gateway/blob/master/src/github.com/couchbase/sync_gateway/db/changes.go#L373). I think this will need to be enhanced to ensure that the correct value of the deleted flag and revision number are sent. |
I am using
on android 5.0.1 and Sync Gateway 1.1.0-28 on Ubuntu 12.0.4 64 bit I have the similar issue, when the user lose access of doc1's channel A,the changed of doc1 will not sync, and from cbl, the doc1 don't have _removed=true property. |
@atom992 That doesn't sound like the same issue described above. You should be getting removal notification in that scenario currently, unless the user has access to the doc via another channel. |
@pasin I'd like to sync up to review whether this is still a valid issue/potential enhancement for SG, or it should be closed. |
Incorporated into https://issues.couchbase.com/browse/CBG-639 |
In the process of discussing the behavior of
_removed
revisions (see couchbase/couchbase-lite-ios#671) questions arose regarding the expected behavior for certain scenarios:_removed
but had not yet been purged from a user's CBL database.The text was updated successfully, but these errors were encountered: