HI,
I inspect data from web console N1QL as follows:
SELECT META().id,* FROM kitchen
WHERE meta().xattrs._sync.history.deleted[0]=1
LIMIT 1000
the statements result like as follows:
},
{
“id”: “Handover.def3825e-b7a1-477b-8612-a82ac24d64af”,
“kitchen”: {}
},
{
“id”: “Handover.f47722fd-958c-48ab-83b9-6e6a8717aa30”,
“kitchen”: {}
},
{
“id”: “Member.00ed69e8-1ddc-41c1-80e0-03ebf1ecb16a”,
“kitchen”: {}
},
{
“id”: “Member.00edc35d-1ddd-41c1-80e0-03eacbbfb169”,
“kitchen”: {}
},
{
“id”: “Member.010b5ded-1ede-40cf-8c7f-f60667a20241”,
“kitchen”: {
“birthday”: “”,
“cardNo”: “000008”,
“channelId”: “733d2f51”,
“chargePresentTotal”: 0,
“chargeTotal”: 0,
“className”: “Member”,
“createdTime”: “2017-06-30 14:10”,
“hangupConsumed”: 0,
“hangupInfo”: “”,
“hangupTotal”: 0,
“invoice”: false,
“location”: “徽州人家”,
“mobile”: “”,
“name”: “陈婧”,
“operator”: “Employee.62d46e48-843a-43d7-aae0-434250cb443d”,
“promotionId”: “Promotion.c7529d96-d8b3-4012-b581-9639a4fbdd8a”,
“valid”: true
}
},
{
“id”: “Member.01629e85-0dba-4256-8184-fbcd87bb7c81”,
“kitchen”: {}
},
{
“id”: “Member.0276052c-1b5f-4d26-a702-227f2938eb77”,
“kitchen”: {}
},
I want use this statement to filter documents tomb, a lot of documents looks match the filter, the documents body is empty . but a few of documents still have body contents. like as follows:
[root@k8s-master1 ~]# curl http://localhost:4985/kitchen/Company.af0a9555-b66d-4551-999b-3356aa4a9298
{“_id”:“Company.af0a9555-b66d-4551-999b-3356aa4a9298”,“_rev”:“3-21840a75bcd2fdcbcd8dd08b1eb5a08e”,“channelId”:“733d2f51”,“className”:“Company”,“dataType”:“BaseData”,“mobile”:“13075368763”,“pointName”:“徽州人家”,“pwd”:“$2a$10$8ZJP1aEqLGDy3qz9ZCAMAOVnVbDbX2mxTLhwDvFYVvFMo6EK3qsOq”}[root@k8s-master1 ~]#
[root@k8s-master1 ~]#
[root@k8s-master1 ~]#
[root@k8s-master1 ~]# curl http://localhost:4985/kitchen/_raw/Company.af0a9555-b66d-4551-999b-3356aa4a9298
{“_sync”:{“rev”:“3-21840a75bcd2fdcbcd8dd08b1eb5a08e”,“sequence”:42443,“recent_sequences”:[40612,42441,42443],“history”:{“revs”:[“1-6169ea69cff843decd69002a90f21af7”,“2-966926570b96c7b795338fffb15f88ff”,“3-21840a75bcd2fdcbcd8dd08b1eb5a08e”],“parents”:[-1,0,1],“deleted”:[1],“channels”:[[“733d2f51”],null,[“733d2f51”]]},“channels”:{“733d2f51”:null},“access”:{“733d2f51”:{“733d2f51”:42443,“733d2f51_casher”:42443}},“cas”:“0x00004bb831b89715”,“value_crc32c”:“0x49248e0f”,“time_saved”:“2019-04-22T14:31:59.954590178+08:00”},“channelId”:“733d2f51”,“className”:“Company”,“dataType”:“BaseData”,“mobile”:“13075368763”,“pointName”:“徽州人家”,“pwd”:“$2a$10$8ZJP1aEqLGDy3qz9ZCAMAOVnVbDbX2mxTLhwDvFYVvFMo6EK3qsOq”}[root@k8s-master1 ~]#
why the deleted is 1, but still curl get this documents from sg?
can I use above n1ql statements filter deleted documents?
when I browse document from web console ui, displayed a lot of documents with empty contents as follows:
are those documents is deleted document tomb?
the couchbase lite still synced those files.
maybe I used method is error. when the documents not for useing, I use logical deleted from sg or golang sdk. Will cause such a problem, right?
the couchbase lite after the test has been used for a while, the application become very slow. and the sync very slow.
when I ensure the documents never need, must I calll purge from sg or sdk?
my env is:
cb: 6.0.1
lite: 2.5
sg: 2.5
if I mistake before, haven’t purge not need documents, how can I filter and delete those documents tombo?
thanks!
angular