Hi All,
We have found that there are documents which when we make a get call the response is
{
“error”: “not_found”,
“reason”: “missing”
}
but when we fire the _change request
_changes?filter=sync_gateway/bychannel&channels=GuestStatus&include_docs=true
The complete document is available. After that if I restart the sync gateway then the document disappers from the _changes call.
I think it looks like cache issue. Hint :- May be the documents are purged and the sync gateway in not notified of the purging. (Just a guess)
I am using CBS 5.1.1 , SG 2.0. and
following is the configuration of the bucket in sync gateway :-
{
“server”: “http://...,...:8091”,
“pool”: “default”,
“bucket”: “bucketname”,
“username”: “bucketname”,
“password”: “password”,
“name”: “username”,
“sync”: “function(doc, oldDoc)\n{ \n if(doc.type)\n {\n if(doc.type == "type1" || doc.type == "type2" || doc.type == "type3")\n {\n if(doc.lastModifiedDate)\n {\n var dttimeStamp = new Date(doc.lastModifiedDate).getTime();\n dttimeStamp=dttimeStamp+(15 * 24 * 3600 * 1000);\n expiry(new Date(dttimeStamp).toISOString());\n }\n else\n {\n expiry("3600");\n }\n }\n }\n if(doc.channels) \n channel(doc.channels);\n}”,
“users”: {
“GUEST”: {
“name”: “”,
“all_channels”: null,
“disabled”: true
},
“Xuser”: {
“name”: “Xuser”,
“admin_channels”: [
“"
],
“all_channels”: null,
“password”: ""
},
“Yuser”: {
“name”: “Yuser”,
“admin_channels”: [
""
],
“all_channels”: null,
“password”: "***”
}
},
“import_docs”: “continuous”,
“cache”: {
“enable_star_channel”: null,
“channel_cache_max_length”: 100000,
“channel_cache_min_length”: 50,
“channel_cache_expiry”: 600
},
“rev_cache_size”: 200000,
“unsupported”: {
“user_views”: {},
“oidc_test_provider”: {}
},
“enable_shared_bucket_access”: true,
“session_cookie_name”: “”
}
CC @househippo, @adamf, @bbrks, @traun
Regards
Pankaj Sharma