-
Notifications
You must be signed in to change notification settings - Fork 298
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
Obsolete rows left in view index when documentType is used (1.1.1) #1095
Comments
If you lose access to a document on the server (because you lose access to all the channels it's in), the replicator will pull one final stub revision containing nothing but It shouldn't be a problem that these show up to your map function, because they don't contain any data that would trigger your map function to emit anything. |
But what i get in the map function is a document with all the properties which causes the map function to emit it. While if i tried to get the document itself from the CBLQueryRow i find it without userProperties and with _removed = true. |
I've just noticed that this problem happens only when i set the |
That sounds like a bug, then. As though when the documentType doesn't match, the doc is skipped but the obsolete rows don't get removed. Could you try the latest 1.2 release candidate, and see if it still happens? We're about to release 1.2, and a lot of things have changed. |
I've tried |
This is using the default storage engine (SQLite)? |
Yes it uses the default storage engine |
We've got a unit test that checks this exact situation. So maybe I'm not understanding exactly what's going on in your case. Could you describe the problem in detail, as a series of steps? |
From server-side i'm not aware of much details, but there are updates that happens periodically to the documents, those updates may revoke the access of specific documents to users, but the documents are not deleted and can be accessed from admin port. From client-side:
|
Your map block might be throwing an exception if it doesn't find the properties it's expecting … I think that could cause symptoms like what you're seeing (it'll abort the update of the view index, leaving it out of date.) Have you checked the logs for any warnings about exceptions? |
I already check for the properties i'm expecting before emitting, the map function is actually like this
i've also checked the logs and there is no warning or exception |
This is very mysterious. Could you enable |
Those are the ids for some of the current affected documents: |
Can you post the logs too (as requested above)? |
Aha sorry, here is the logs |
Sorry, I can't figure out the problem from those logs. I see the document getting indexed once, then returned in queries several times. Could you please also turn on |
Currently i'm not able to reproduce the issue, i'll try again and post the logs once i'm able to reproduce it. |
@aibrahim16 please re-file if this happens again. |
I've an issue where some documents passes through the map function with its userProperties, but when i try to get the document itself, i don't found the userProperties and find that it has
_removed = true
but not removed from the CBLView, when i tried to make get all documents from REST i didn't get those removed documents.I'm using CBL 1.1.1
The text was updated successfully, but these errors were encountered: