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

Document reverts to original when deleted #1425

Closed
sevenlogics opened this issue Aug 31, 2016 · 4 comments
Closed

Document reverts to original when deleted #1425

sevenlogics opened this issue Aug 31, 2016 · 4 comments

Comments

@sevenlogics
Copy link

sevenlogics commented Aug 31, 2016

This is the scenario.

Device A, B and C are connected and linked to Sync gateway. All data is in Sync
Device A creates a new document called Doc-Rev1. Device B and C is opened and connected, both device see Doc-Rev1
We now close Device B and C. Leaving A on and online.
Using Device A, we change the document to Doc-Rev2.
Now we open Device B and let it talk to sync gateway. Device B gets Doc-Rev2. Device C is closed and is offline still.
Device A and Device B is both opened and talking to sync gateway still
Device A deletes the Doc. Device B is synced up and deletes the Doc too.
Now we open Device C. Doc-Rev1 remains on Device C


  • Version: 1.3
  • Client OS: iOS9
  • Server: Sync gateway
@pasin
Copy link
Contributor

pasin commented Sep 1, 2016

It seems like Device C doesn't get synced properly from the SGW.

@sevenlogics Can you enable Sync and SyncVerbose logging and share the log of the Device C as well as the log of Sync Gateway?

@sevenlogics
Copy link
Author

Heres the log from Device C when it first synced up with the Document

2016-09-01 09:21:56.632 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: postProgressChanged (0/1, active=0 (batch=0, net=0), lastSeq=141078, online=1, error=(null))
2016-09-01 09:21:56.633 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: Received #141269 {-A2iLLe1Vcjz2WlCCLKjF9W #1-93ada39e475961afe5a31528d01469e3}
2016-09-01 09:21:56.633 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB] Progress: set active = 1
2016-09-01 09:21:56.634 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: postProgressChanged (0/1, active=1 (batch=1, net=0), lastSeq=141078, online=1, error=(null))
2016-09-01 09:21:56.637 iOSApp[5122:2171430] Sync: CBLReplication[from http://SYNC_GATEWAY/DB]: active, progress = 0 / 1, err: (null)
2016-09-01 09:21:56.638 iOSApp[5122:2171552] Sync: *** CBLRestPuller[http://SYNC_GATEWAY/DB]: BEGIN processInbox (1 sequences)
2016-09-01 09:21:56.662 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: Looking up (
"{-A2iLLe1Vcjz2WlCCLKjF9W #1-93ada39e475961afe5a31528d01469e3}"
)
2016-09-01 09:21:56.665 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB] queuing remote revisions (
"{-A2iLLe1Vcjz2WlCCLKjF9W #1-93ada39e475961afe5a31528d01469e3}"
)
2016-09-01 09:21:56.665 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB] queued 1 remote revisions from seq=141269 (1 in bulk, 0 individually)
2016-09-01 09:21:56.666 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: GET -A2iLLe1Vcjz2WlCCLKjF9W?rev=1-93ada39e475961afe5a31528d01469e3&revs=true&attachments=true
2016-09-01 09:21:56.667 iOSApp[5122:2171552] Sync: *** CBLRestPuller[http://SYNC_GATEWAY/DB]: END processInbox (lastSequence=141078)
2016-09-01 09:21:56.915 iOSApp[5122:2171552] Sync: CBLMultipartDownloader[/family_organizer/-A2iLLe1Vcjz2WlCCLKjF9W]: Finished loading (0 attachments)
2016-09-01 09:21:56.916 iOSApp[5122:2171552] Sync: CBLMultipartDocumentReader[_id="(null)"]: Finished loading (0 attachments)
2016-09-01 09:21:56.918 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB] inserting 1 revisions...
2016-09-01 09:21:56.919 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB] inserting -A2iLLe1Vcjz2WlCCLKjF9W [1-93ada39e475961afe5a31528d01469e3]
2016-09-01 09:21:56.928 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB] finished inserting 1 revisions
2016-09-01 09:21:56.934 iOSApp[5122:2171552] Sync: CBLRestPusher[http://SYNC_GATEWAY/DB]: Setting lastSequence to 373 (from 372)
2016-09-01 09:21:56.935 iOSApp[5122:2171552] Sync: CBLRestPusher[http://SYNC_GATEWAY/DB]: postProgressChanged (1/1, active=0 (batch=0, net=0), lastSeq=373, online=1, error=(null))
2016-09-01 09:21:56.936 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: Setting lastSequence to 141269 (from 141078)
2016-09-01 09:21:56.937 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: postProgressChanged (0/1, active=1 (batch=0, net=1), lastSeq=141269, online=1, error=(null))
2016-09-01 09:21:56.937 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB] inserted 1 revs in 0.019 sec (53.0/sec)
2016-09-01 09:21:56.940 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB] Progress: set active = 0
2016-09-01 09:21:56.940 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: postProgressChanged (0/1, active=0 (batch=0, net=0), lastSeq=141269, online=1, error=(null))
2016-09-01 09:21:56.941 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB] Progress: 1 / 1
2016-09-01 09:21:56.941 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: postProgressChanged (1/1, active=0 (batch=0, net=0), lastSeq=141269, online=1, error=(null))
2016-09-01 09:21:56.943 iOSApp[5122:2171430] Sync: CBLReplication[from http://SYNC_GATEWAY/DB]: idle, progress = 1 / 1, err: (null)
pull idle 2016-09-01 16:21:56 +0000

Here's log for Device C after the Doc was changed and deleted from Device A and B

2016-09-01 09:23:06.280 iOSApp[5122:2171552] Sync: CBLRestPusher[http://SYNC_GATEWAY/DB]: Reachability state = <ec2-52-205-43-6.compute-1.amazonaws.com>:reachable (02), suspended=0
2016-09-01 09:23:06.280 iOSApp[5122:2171552] Sync: CBLRestPusher[http://SYNC_GATEWAY/DB]: Going online
2016-09-01 09:23:06.280 iOSApp[5122:2171552] Sync: CBLRestPusher[http://SYNC_GATEWAY/DB] Progress: set active = 1
2016-09-01 09:23:06.280 iOSApp[5122:2171552] Sync: CBLRestPusher[http://SYNC_GATEWAY/DB]: postProgressChanged (1/1, active=1 (batch=0, net=1), lastSeq=(null), online=1, error=(null))
2016-09-01 09:23:06.280 iOSApp[5122:2171552] Sync: <CBLRemoteSession: 0x140152e10>: GET /family_organizer/_local/7409e6460d2359895d84165c7bc782f8ad557dde
2016-09-01 09:23:06.281 iOSApp[5122:2171552] Sync: CBLRestPusher[http://SYNC_GATEWAY/DB]: postProgressChanged (1/1, active=1 (batch=0, net=1), lastSeq=(null), online=1, error=(null))
2016-09-01 09:23:06.282 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: Reachability state = <ec2-52-205-43-6.compute-1.amazonaws.com>:reachable (02), suspended=0
2016-09-01 09:23:06.282 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: Going online
2016-09-01 09:23:06.283 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB] Progress: set active = 1
2016-09-01 09:23:06.283 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: postProgressChanged (1/1, active=1 (batch=0, net=1), lastSeq=(null), online=1, error=(null))
2016-09-01 09:23:06.283 iOSApp[5122:2171552] Sync: <CBLRemoteSession: 0x140144580>: GET /family_organizer/_local/31e7b81c31620e774b604bc5a9fe3b1084e7d369
2016-09-01 09:23:06.283 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: postProgressChanged (1/1, active=1 (batch=0, net=1), lastSeq=(null), online=1, error=(null))
2016-09-01 09:23:06.301 iOSApp[5122:2171430] Sync: CBLReplication[to http://SYNC_GATEWAY/DB]: active, progress = 1 / 1, err: (null)
pull offline 2016-09-01 16:23:06 +0000 nil
2016-09-01 09:23:06.303 iOSApp[5122:2171430] Sync: CBLReplication[from http://SYNC_GATEWAY/DB]: active, progress = 1 / 1, err: (null)
2016-09-01 09:23:06.607 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: Replicating from lastSequence=141269
2016-09-01 09:23:06.608 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB] starting ChangeTracker: mode=3, since=141269
2016-09-01 09:23:06.608 iOSApp[5122:2171552] Sync: CBLWebSocketChangeTracker[0x1401668f0 family_organizer]: GET //SYNC_GATEWAY/DB/_changes?feed=websocket
2016-09-01 09:23:06.609 iOSApp[5122:2171552] Sync: CBLRestPusher[http://SYNC_GATEWAY/DB]: Replicating from lastSequence=373
2016-09-01 09:23:06.609 iOSApp[5122:2171552] Sync: CBLRestPusher[http://SYNC_GATEWAY/DB]: Received 0 revs
2016-09-01 09:23:06.609 iOSApp[5122:2171552] Sync: CBLRestPusher[http://SYNC_GATEWAY/DB] Progress: set active = 0
2016-09-01 09:23:06.614 iOSApp[5122:2171552] Sync: CBLRestPusher[http://SYNC_GATEWAY/DB]: postProgressChanged (1/1, active=0 (batch=0, net=0), lastSeq=373, online=1, error=(null))
2016-09-01 09:23:06.614 iOSApp[5122:2171430] Sync: CBLReplication[to http://SYNC_GATEWAY/DB]: idle, progress = 1 / 1, err: (null)
Sep 1 09:23:06 iOSApp[5122] : starting profile request using - 3.1-57 - TapJoy with options: 1fc7e
2016-09-01 09:23:07.081 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: postProgressChanged (1/2, active=1 (batch=0, net=1), lastSeq=141269, online=1, error=(null))
2016-09-01 09:23:07.082 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: Received #141272 {-A2iLLe1Vcjz2WlCCLKjF9W #3-e514eb70c137a9374320302202524cc5 DEL}
2016-09-01 09:23:07.090 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: Caught up with changes!
2016-09-01 09:23:07.091 iOSApp[5122:2171430] Sync: CBLReplication[from http://SYNC_GATEWAY/DB]: active, progress = 1 / 2, err: (null)
2016-09-01 09:23:07.091 iOSApp[5122:2171552] Sync: *** CBLRestPuller[http://SYNC_GATEWAY/DB]: BEGIN processInbox (1 sequences)
2016-09-01 09:23:07.095 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: Looking up (
"{-A2iLLe1Vcjz2WlCCLKjF9W #3-e514eb70c137a9374320302202524cc5 DEL}"
)
2016-09-01 09:23:07.096 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB] queuing remote revisions (
"{-A2iLLe1Vcjz2WlCCLKjF9W #3-e514eb70c137a9374320302202524cc5 DEL}"
)
2016-09-01 09:23:07.096 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB] queued 1 remote revisions from seq=141272 (1 in bulk, 0 individually)
2016-09-01 09:23:07.096 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: GET -A2iLLe1Vcjz2WlCCLKjF9W?rev=3-e514eb70c137a9374320302202524cc5&revs=true&attachments=true&atts_since=%5B%221-93ada39e475961afe5a31528d01469e3%22%5D
2016-09-01 09:23:07.098 iOSApp[5122:2171552] Sync: *** CBLRestPuller[http://SYNC_GATEWAY/DB]: END processInbox (lastSequence=141269)
2016-09-01 09:23:07.345 iOSApp[5122:2171552] Sync: CBLMultipartDownloader[/family_organizer/-A2iLLe1Vcjz2WlCCLKjF9W]: Finished loading (0 attachments)
2016-09-01 09:23:07.345 iOSApp[5122:2171552] Sync: CBLMultipartDocumentReader[_id="(null)"]: Finished loading (0 attachments)
2016-09-01 09:23:07.345 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB] inserting 1 revisions...
2016-09-01 09:23:07.345 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB] inserting -A2iLLe1Vcjz2WlCCLKjF9W [3-e514eb70c137a9374320302202524cc5, 2-4f8d8d67f6d08ee1aeed08fb9e9af027]
2016-09-01 09:23:07.349 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB] finished inserting 1 revisions
2016-09-01 09:23:07.353 iOSApp[5122:2171552] Sync: CBLRestPusher[http://SYNC_GATEWAY/DB]: Setting lastSequence to 375 (from 373)
2016-09-01 09:23:07.354 iOSApp[5122:2171552] Sync: CBLRestPusher[http://SYNC_GATEWAY/DB]: postProgressChanged (1/1, active=0 (batch=0, net=0), lastSeq=375, online=1, error=(null))
2016-09-01 09:23:07.354 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: Setting lastSequence to 141272 (from 141269)
2016-09-01 09:23:07.354 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: postProgressChanged (1/2, active=1 (batch=0, net=1), lastSeq=141272, online=1, error=(null))
2016-09-01 09:23:07.354 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB] inserted 1 revs in 0.009 sec (113.0/sec)
2016-09-01 09:23:07.354 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB] Progress: set active = 0
2016-09-01 09:23:07.354 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: postProgressChanged (1/2, active=0 (batch=0, net=0), lastSeq=141272, online=1, error=(null))
2016-09-01 09:23:07.355 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB] Progress: 2 / 2
2016-09-01 09:23:07.355 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: postProgressChanged (2/2, active=0 (batch=0, net=0), lastSeq=141272, online=1, error=(null))
2016-09-01 09:23:07.355 iOSApp[5122:2171430] Sync: CBLReplication[from http://SYNC_GATEWAY/DB]: idle, progress = 2 / 2, err: (null)
pull idle 2016-09-01 16:23:07 +0000

@djpongh djpongh added this to the 1.5 milestone Sep 29, 2016
@djpongh djpongh removed this from the 1.5.0 milestone Nov 16, 2016
@djpongh djpongh added icebox and removed backlog labels Nov 16, 2016
@pasin
Copy link
Contributor

pasin commented Dec 20, 2016

Sorry for the late response. From the log above, it seems like device C got the deleted revision correctly:

2016-09-01 09:23:07.082 iOSApp[5122:2171552] Sync: CBLRestPuller[http://SYNC_GATEWAY/DB]: Received #141272 {-A2iLLe1Vcjz2WlCCLKjF9W #3-e514eb70c137a9374320302202524cc5 DEL}

Would this be a UI issue? Could you please double check, probably my manually get the document by ID from the database after the replication is done?

@pasin
Copy link
Contributor

pasin commented Dec 28, 2016

I'm closing the issue now. We can reopen the issue when there is more information provided. Thanks.

@pasin pasin closed this as completed Dec 28, 2016
@pasin pasin removed the icebox label Dec 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants