Hey Priya,
Ok, good to know that my understanding isn’t warped by anything.
Here’s the raw query results:
{
"_sync": {
"rev": "31-cba600e2a01af501a608093a34419c20",
"flags": 24,
"sequence": 1334858,
"recent_sequences": [
820253,
821933,
821942,
827785,
1334491,
1334781,
1334783,
1334856,
1334858
],
"history": {
"revs": [
"19-c31b481507064f2f30f1aae25da27641",
"28-023a8ffdf9baaa9680c0ab341076f6c9",
"8-1c27fcc3531a0330f23740b11a6ede71",
"1-03c4291a8789d42e2fb081a4629dceec",
"15-f9bff1d2fcdce3158ecb197b346bd07c",
"26-1856b380fabb8f16d4d534c0e2012fba",
"12-deddfaf2e0d38919e7154d325304cfab",
"1-c67f2dd73a207c240cec6e71f5e5003b",
"2-5fbe8954f8348cc3425c2cb536d6ee4a",
"14-dc17bd0a0ab3a6d8928e40184ebe6b4f",
"21-39319698d61f8299b712d043ac5bf356",
"7-20e3736982468200c76f2b4c0c54d97a",
"22-94283606598f3c080cbb05dc4b04971a",
"31-cba600e2a01af501a608093a34419c20",
"13-5113ee0f45b598030438ea4beabf1415",
"3-b0176d698c738c05ccd5e04ee59eaf2f",
"29-e02a2001ffd69d78ae45a379c5455179",
"24-e18c125d2d9a5bc9885aaef5d088c768",
"16-cce13d02b0eea6a87e1d2549e5d96f0c",
"30-645668f1bbb52c682212cd73a36c125e",
"17-9fbe7882a57a19063ad1c1630855f678",
"27-a251e5a15bf9545e9707ddc2fd8cb57a",
"20-098ee5f049e647b6da51cc2c52e686b0",
"11-756950f134105dc24c7311653e3199c0",
"25-fb8f889caf5186e8ab86e41816f5b9b7",
"23-06fac88eadece90b6bd7f61cf87940ea",
"2-6ea23606def1a0787a645bcba545787d",
"9-3c81129357cbb3da2dfffc19619b66cf",
"18-46d080af78a967f27328e360b72ec56a",
"10-e52aa222137613db13d1d6a94501f796"
],
"parents": [
28,
21,
11,
-1,
9,
24,
23,
-1,
7,
14,
22,
-1,
10,
19,
6,
8,
1,
25,
4,
16,
18,
5,
0,
29,
17,
12,
3,
2,
20,
27
],
"deleted": [
26
],
"bodymap": {
"15": "{\"balance\":0,\"facility_id\":\"5f9b25c5-4bff-46cc-83dc-0c7aee2a6e0a\",\"loans\":[],\"name\":\"AARON\",\"payments\":[],\"phone_number\":\"+254727347491\",\"type\":\"Patient\"}",
"26": "{\"_deleted\":true,\"balance\":0,\"facility_id\":\"c3e5d002-a9b8-456c-b194-c1b4a7668ae9\",\"loans\":[],\"name\":\"Sammy Aaron Wilks\",\"payments\":[],\"phone_number\":\"+254727347491\",\"type\":\"Patient\"}"
},
"channels": [
null,
[
"c3e5d002-a9b8-456c-b194-c1b4a7668ae9"
],
null,
[
"c3e5d002-a9b8-456c-b194-c1b4a7668ae9"
],
null,
[
"c3e5d002-a9b8-456c-b194-c1b4a7668ae9"
],
null,
null,
null,
null,
null,
null,
null,
[
"c3e5d002-a9b8-456c-b194-c1b4a7668ae9"
],
null,
[
"5f9b25c5-4bff-46cc-83dc-0c7aee2a6e0a"
],
[
"c3e5d002-a9b8-456c-b194-c1b4a7668ae9"
],
null,
null,
[
"c3e5d002-a9b8-456c-b194-c1b4a7668ae9"
],
null,
[
"c3e5d002-a9b8-456c-b194-c1b4a7668ae9"
],
null,
null,
null,
null,
[
"c3e5d002-a9b8-456c-b194-c1b4a7668ae9"
],
null,
null,
null
]
},
"channels": {
"c3e5d002-a9b8-456c-b194-c1b4a7668ae9": null
},
"time_saved": "2017-09-12T11:24:12.196614982Z"
},
"balance": 0,
"facility_id": "c3e5d002-a9b8-456c-b194-c1b4a7668ae9",
"loans": [],
"name": "Sammy Aaron Wilks",
"payments": [],
"phone_number": "+254727347491",
"type": "Patient"
}
and here’s a more complete log record. I’ve only included the bottom 60 lines or so. Let me know if you need more:
09-12 20:06:38.143 4105-14278/com.my_company.my_app V/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33}: Setting lastSequence to 4882 from(4830)
09-12 20:06:38.143 4105-14278/com.my_company.my_app V/Sync: setPaused: false
09-12 20:06:38.143 4105-14278/com.my_company.my_app V/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33}: Setting lastSequence to 4883 from(4882)
09-12 20:06:38.143 4105-14278/com.my_company.my_app V/Sync: setPaused: false
09-12 20:06:38.145 4105-14278/com.my_company.my_app V/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33}: Setting lastSequence to 4884 from(4883)
09-12 20:06:38.146 4105-14278/com.my_company.my_app V/Sync: setPaused: false
09-12 20:06:38.158 4105-14278/com.my_company.my_app V/Sync: setPaused: false
09-12 20:06:38.159 4105-14278/com.my_company.my_app V/Sync: setPaused: false
09-12 20:06:38.270 4105-14278/com.my_company.my_app V/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33}: POSTing 2 revisions to _bulk_docs: [{balance=0, _rev=32-a9473f847b6d629c08eac9a7e61e6d49, payments=[], loans=[], name=Sammy Aaron Wilks, _revisions={start=32, ids=[a9473f847b6d629c08eac9a7e61e6d49, cba600e2a01af501a608093a34419c20]}, _id=+254727347491, type=Patient, facility_id=c3e5d002-a9b8-456c-b194-c1b4a7668ae9, phone_number=+254727347491}, {balance=-668.94, _rev=49-7cf06315d5de443fadaecc33b9d6d318, payments=[{_id=null, amount=80, date=1.474261346844E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=1, date=1.47426239985E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=1, date=1.474262401288E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=1, date=1.474262401656E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=1, date=1.474262401966E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=1, date=1.474262402261E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=1, date=1.474262402624E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=1, date=1.474262402825E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=2, date=1.474262673812E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=201, date=1.474263051355E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=20, date=1.474263313554E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=35, date=1.474341122515E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=1, date=1.474345222681E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=4, date=1.474345353915E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=10, date=1.474345365678E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=25, date=1.479808757924E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=2.29, date=1.479808765253E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=290, date=1.479896955765E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=1000, date=1.481208416905E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=1085.01, date=1.481271541027E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=1000, date=1.484907588936E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=3, date=1.484907632272E12, mpesa_confirmation=null, patient_id=null}, {_id=null, amount=10, date=1.497364350013E12, mpesa_confirmation=null, patient_id=0727347491}], loans=[{_id=null, amount=80, date_due=0, date_given=1.474261330077E12, patient_id=0727347491, sale_id=null}, {_id=null, amount=210, date_due=0, date_given=1.474261435483E12, patient_id=0727347491, sale_id=null}, {_id=null, amount=20, date_due=0, date_given=1.4742632854E12, patient_id=0727347491, sale_id=null}, {_id=null, amount=50, date_due=0, date_given=1.474341019425E12, patient_id=0727347491, sale_id=null}, {_id=null, amount=60, date_due=0, date_given=1.474345326864E12, patient_id=0727347491, sale_id=null}, {_id=null, amount=5.99, date_due=0, date_given=1.474945724698E12, patient_id=0727347491, sale_id=null}, {_id=null, amount=8.3, date_due=0, date_given=1.47699602524E12, patient_id=0727347491, sale_id=null}, {_id=null, amount=243, date_due=0, date_given=1.479801391829E12, patient_id=0727347491, sale_id=null}, {_id=null, amount=32, date_due=0, date_given=1.481101520803E12, patient_id=0727347491, sale_id=null}, {_id=null, amount=1218, date_due=0, date_given=1.481103286342E12, patient_id=0727347491, sale_id=null}, {_id=null, amount=235.01, date_due=0, date_given=1.481103482108E12, patient_id=0727347491, sale_id=null}, {_id=null, amount=175, date_due=0, date_given=1.481203873109E12, patient_id=0727347491, sale_id=null}, {_id=null, amount=7, date_due=0, date_given=1.481206754104E12, patient_id=0727347491, sale_id=null}, {_id=null, amount=18, date_due=0, date_given=1.481266751984E12, patient_id=0727347491, sale_id=null}, {_id=null, amount=1400, date_due=0, date_given=1.481267950742E12, patien
09-12 20:06:38.274 4105-14278/com.my_company.my_app V/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33}: Incrementing changesCount count from 0 by adding 2 -> 2
09-12 20:06:38.277 4105-14278/com.my_company.my_app D/Sync: [sendAsyncRequest()] POST => https://api.mycompany.com:4984/my-db/_bulk_docs
09-12 20:06:38.282 4105-14278/com.my_company.my_app V/Sync: com.couchbase.lite.replicator.RemoteRequest {POST, https://api.mycompany.com:4984/my-db/_bulk_docs}: RemoteRequest created, url: https://api.mycompany.com:4984/my-db/_bulk_docs
09-12 20:06:38.283 4105-14262/com.my_company.my_app V/Sync: com.couchbase.lite.replicator.RemoteRequest {POST, https://api.mycompany.com:4984/my-db/_bulk_docs}: RemoteRequest execute() called, url: https://api.mycompany.com:4984/my-db/_bulk_docs
09-12 20:06:38.367 4105-14278/com.my_company.my_app V/Sync: com.couchbase.lite.replicator.RemoteRequest {POST, https://api.mycompany.com:4984/my-db/_revs_diff}: RemoteRequest execute() finished, url: https://api.mycompany.com:4984/my-db/_revs_diff
09-12 20:06:38.791 4105-14262/com.my_company.my_app V/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33}: Setting lastSequence to 4887 from(4884)
09-12 20:06:38.791 4105-14262/com.my_company.my_app V/Sync: setPaused: false
09-12 20:06:38.791 4105-14262/com.my_company.my_app V/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33}: Setting lastSequence to 4888 from(4887)
09-12 20:06:38.791 4105-14262/com.my_company.my_app V/Sync: setPaused: false
09-12 20:06:38.791 4105-14262/com.my_company.my_app V/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33}: POSTed to _bulk_docs
09-12 20:06:38.791 4105-14262/com.my_company.my_app V/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33}: Incrementing completedChangesCount count from 0 by adding 2 -> 2
09-12 20:06:38.792 4105-14262/com.my_company.my_app V/Sync: com.couchbase.lite.replicator.RemoteRequest {POST, https://api.mycompany.com:4984/my-db/_bulk_docs}: RemoteRequest execute() finished, url: https://api.mycompany.com:4984/my-db/_bulk_docs
09-12 20:06:38.793 4105-14226/com.my_company.my_app D/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33} [fireTrigger()] => STOP_GRACEFUL
09-12 20:06:38.794 4105-14226/com.my_company.my_app V/Sync: [waitForPendingFutures()] END - thread id: 313
09-12 20:06:38.805 4105-14222/com.my_company.my_app D/Sync: firing trigger: STOP_GRACEFUL
09-12 20:06:38.806 4105-14222/com.my_company.my_app V/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33} [onExit()] RUNNING => STOPPING
09-12 20:06:38.806 4105-14222/com.my_company.my_app V/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33} [onEntry()] RUNNING => STOPPING
09-12 20:06:38.806 4105-14222/com.my_company.my_app D/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33} STOPPING...
09-12 20:06:38.806 4105-14222/com.my_company.my_app V/Sync: setPaused: false
09-12 20:06:38.807 4105-14222/com.my_company.my_app D/Sync: State transition: RUNNING -> STOPPING (via STOP_GRACEFUL). this: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33}
09-12 20:06:38.807 4105-14222/com.my_company.my_app V/Sync: Both RUNNING and STOPPING are ACTIVE, not notify Replicator state change
09-12 20:06:38.807 4105-14391/com.my_company.my_app V/Sync: [waitForPendingFutures()] STARTED - thread id: 348
09-12 20:06:38.807 4105-14391/com.my_company.my_app D/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33} [fireTrigger()] => STOP_GRACEFUL
09-12 20:06:38.808 4105-14391/com.my_company.my_app V/Sync: [waitForPendingFutures()] END - thread id: 348
09-12 20:06:38.808 4105-14391/com.my_company.my_app D/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33} [fireTrigger()] => STOP_IMMEDIATE
09-12 20:06:38.808 4105-14391/com.my_company.my_app D/Sync: PusherInternal stop.run() finished
09-12 20:06:38.809 4105-14222/com.my_company.my_app D/Sync: firing trigger: STOP_GRACEFUL
09-12 20:06:38.810 4105-14222/com.my_company.my_app D/Sync: firing trigger: STOP_IMMEDIATE
09-12 20:06:38.810 4105-14222/com.my_company.my_app V/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33} [onEntry()] STOPPING => STOPPED
09-12 20:06:38.810 4105-14222/com.my_company.my_app D/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33}: saveLastSequence() called. lastSequence: 4888 remoteCheckpoint: {_rev=0-1, lastSequence=2332}
09-12 20:06:38.810 4105-14222/com.my_company.my_app D/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33}: start put remote _local document. checkpointID: c9d33b63ede2f1e0a5accefe88f168aaa0ec1139 body: {_rev=0-1, lastSequence=4888}
09-12 20:06:38.810 4105-14222/com.my_company.my_app D/Sync: [sendAsyncRequest()] PUT => https://api.mycompany.com:4984/my-db/_local/c9d33b63ede2f1e0a5accefe88f168aaa0ec1139
09-12 20:06:38.811 4105-14222/com.my_company.my_app V/Sync: com.couchbase.lite.replicator.RemoteRequest {PUT, https://api.mycompany.com:4984/my-db/_local/c9d33b63ede2f1e0a5accefe88f168aaa0ec1139}: RemoteRequest created, url: https://api.mycompany.com:4984/my-db/_local/c9d33b63ede2f1e0a5accefe88f168aaa0ec1139
09-12 20:06:38.839 4105-14392/com.my_company.my_app V/Sync: [waitForPendingFutures()] STARTED - thread id: 349
09-12 20:06:38.846 4105-14223/com.my_company.my_app V/Sync: com.couchbase.lite.replicator.RemoteRequest {PUT, https://api.mycompany.com:4984/my-db/_local/c9d33b63ede2f1e0a5accefe88f168aaa0ec1139}: RemoteRequest execute() called, url: https://api.mycompany.com:4984/my-db/_local/c9d33b63ede2f1e0a5accefe88f168aaa0ec1139
09-12 20:06:39.091 4105-14392/com.my_company.my_app D/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33} [fireTrigger()] => STOP_GRACEFUL
09-12 20:06:39.091 4105-14392/com.my_company.my_app V/Sync: [waitForPendingFutures()] END - thread id: 349
09-12 20:06:39.103 4105-14223/com.my_company.my_app D/Sync: com.couchbase.lite.replicator.ReplicationInternal$8@b52da8: put remote _local document request finished. checkpointID: c9d33b63ede2f1e0a5accefe88f168aaa0ec1139 body: {_rev=0-1, lastSequence=4888}
09-12 20:06:39.103 4105-14223/com.my_company.my_app D/Sync: com.couchbase.lite.replicator.ReplicationInternal$8@b52da8: saved remote checkpoint, updating local checkpoint. RemoteCheckpoint: {_rev=0-2, lastSequence=4888}
09-12 20:06:39.104 4105-14223/com.my_company.my_app V/Sync: com.couchbase.lite.replicator.RemoteRequest {PUT, https://api.mycompany.com:4984/my-db/_local/c9d33b63ede2f1e0a5accefe88f168aaa0ec1139}: RemoteRequest execute() finished, url: https://api.mycompany.com:4984/my-db/_local/c9d33b63ede2f1e0a5accefe88f168aaa0ec1139
09-12 20:06:39.108 4105-14222/com.my_company.my_app V/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33}: clearDbRef() called
09-12 20:06:39.113 4105-14222/com.my_company.my_app V/Sync: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33}: clearDbRef() setting db to null
09-12 20:06:39.114 4105-14222/com.my_company.my_app D/Sync: State transition: STOPPING -> STOPPED (via STOP_IMMEDIATE). this: PusherInternal{https://api.mycompany.com:4984/my-db/, push, c9d33}
09-12 20:06:39.116 4105-14222/com.my_company.my_app D/Sync: firing trigger: STOP_GRACEFUL
09-12 20:06:39.163 4105-14222/com.my_company.my_app D/SyncManager: DONE SYNC: 1159075
09-12 20:07:31.368 4105-15080/com.my_company.my_app D/FA: Logging event (FE): _e, Bundle[{_o=auto, _et=1210987, _sc=SyncActivity, _si=-5036193825058194409}]
09-12 20:07:32.032 2599-15081/com.google.android.gms V/FA-SVC: Logging event: origin=auto,name=user_engagement(_e),params=Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=1210987, firebase_screen_class(_sc)=SyncActivity, firebase_screen_id(_si)=-5036193825058194409}]
09-12 20:07:32.077 2599-15081/com.google.android.gms V/FA-SVC: Event recorded: Event{appId='com.my_company.my_app', name='user_engagement(_e)', params=Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=1210987, firebase_screen_class(_sc)=SyncActivity, firebase_screen_id(_si)=-5036193825058194409}]}
09-12 20:07:32.171 1337-1337/? E/EGL_emulation: tid 1337: eglCreateSyncKHR(1881): error 0x3004 (EGL_BAD_ATTRIBUTE)
I read it somewhere on one of the couchbase blog posts. I don’t remember exactly where. I’m guessing it was more of a guideline? While we’re on the subject, do deleted docs persist until database compaction happens?
Yea, although I also _removed referenced in the couchbase lite code - is it deprecated?