-
Notifications
You must be signed in to change notification settings - Fork 181
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
delete doesn't sync if using relate #473
Comments
hi @sachinnagesh, monstache attempts to propogate a delete event when relating using this function. Are you able to trace what is not happening correctly in that function? |
If you are not relating by |
@rwynn I am not relating it with My record looks something like this
Created a view in which record looks like this.
Suppose I am deleting record with
Same thing I am expecting should get updated to |
When you delete something in MongoDB the change event only gets the If this succeeds it will queue a resync of the related document after looking it up by the value of Would need more info about what is failing in findDeletedSrcDoc. Any of those errors being reported? |
More intrusive option to your application is that when you delete an address you also perform a multi document update of a timestamp on all user documents where |
@rwynn Thank you. We went with multi document update. |
Hi @rwynn . I have the same issue, but I have also indexed both collections on es. For some reason, there is still an error saying 'No hits for deleted document' with an object ID which I suppose is the ID of the state.
Config:
Also for some reason, there are additional indices being created in es named of the form 'objectID_namespace' for all collections and along with it, an error from bulk response:
Please do clarify if i'm doing something wrong. Also, I didn't understand what you were referring to as multi-document update. |
@irfanbacker regarding the index name in Elasticsearch, are you by chance using MongoDB Atlas free tier (shared cluster)? There was a previous issue which is very similar. I filed a ticket with MongoDB long back and it did get resolved at one point, but not sure if there is a regression? |
@rwynn , Thanks for the quick reply. I am using the free tier of Atlas. Unlike that issue, I wasn't using resume but only replay. Also, when I removed the change namespaces, the bulk response item error still persisted but now, with a proper index name unlike the one with an objectID in it previously:
The issue you mentioned is still occuring, when resume is true. I'll try to looking into it also, but there are other problems too like mentioned above EDIT: Just realised that the collection |
@rwynn Now, everything works perfectly except on test.votes collection, where relate is configured. The same no hits error shows up when deleting as insert operations aren't being done on es. This was caused due to not mentioning keep-src = true for relate. I thought it was true by default. Adding that fixed the issue. But using resume still creates the additional indices, which could be a seperate issue related to atlas cloud. But the relate trigger isn't running now with or without resume, which takes us back to the issue mentioned in this thread. I have made |
Hi @rwynn, I have similar scenario like this #150
I am using
My config looks something like this,
'user-db.users_view' is created on
user-db.users
anduser-db.user_address_details
. One user can have multiple address records. Whenever I am adding new address records or updating existing one, it works fine. But in case of deletion of address record update is not happening in record stored on indexuser-db.users_view-index
The text was updated successfully, but these errors were encountered: