-
Notifications
You must be signed in to change notification settings - Fork 479
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
MongoDB 5.0.6 Compatibility Issues #933
Comments
My Free Atlas cluster was also updated yesterday to 5.0.6 which seems to have broken mongo-connector. Now when certain documents are updated I just get a diff on the other end, without any of the other fields, when before everything seemed to be working fine. I'll investigate but any tips are welcome. Good document:
Bad document:
It's a shame that this project seems to be dead at this point. It is quite useful |
Hi @bablf I got the same error as you with MongoDB, i have found a workaround if you're using Solr Solr Part
batch = list(next(cleaned) for i in range(self.chunk_size))
while batch:
self.solr.add(batch, **add_kwargs)
batch = list(next(cleaned)
for i in range(self.chunk_size)) by this try:
batch = list(next(cleaned) for i in range(self.chunk_size))
while batch:
self.solr.add(batch, **add_kwargs)
batch = list(next(cleaned)
for i in range(self.chunk_size))
except Exception:
pass downgrade pysolr to 3.8.1 Mongo Part downgrade pymongo to 2.9 this workaround works for MongoDB 5.0.6 with mongo-connector 3.1.1, pymongo 2.9 and pysolr 3.8.1 Hope it helps you |
This helped me. Thank you. Cant install pymongo 2.9 so I used 3.12.3 |
@RicardoM17 did you find solution to your problem. I'm experiencing the problem where mongo connector can successfully add and delete the document to Solr instance but failing to update the document. Version 4.x of mongodb used to work fine. My setup |
Hi @gurmitteotia I don't exactly remember but I believe what happened was the following. I was testing a new feature on my personal account. This worked because when I first started I was still in version 4.X.X in MongoDB. Then they rolled out the update to 5.X.X which broke my stuff. That being said I was already going to implement this in my company's MongoDB account which has I guess if you use a paid account you can still specify the version of MongoDB you want. Sorry if I couldn't be of more help. |
Thanks @RicardoM17 , I did investigation and found out reason why document update was failing. I have also published a fix. Primary reason is that "oplog" entry format has been changed in mongodb 5.x for document update. In Mongodb 4.x following oplog entry is generated when fields are changed -
However in case of mongodb 5 oplog entry has been changed to the following format-
And solr-doc-manager plug-in was misinterpreting the "update" document and adding it as new document, which was being rejected by solr. I have put a fix in solr-doc-manager plugin. You can find it in branch - mongo5-fix. I have added unit test to make sure the fix work for both mongodb 4 and mongodb 5. I will try if my fix can be reviewed and merged in the main repository. Summary
|
Hey,
firstup please tell me what additional information is needed to debug this error.
I ran the following command:
mongo-connector --unique-key=id -n news-articles.articles -m localhost:27017 -t http://localhost:8983/solr/mongo_solr_collection -d solr_doc_manager
(Yes i am calling the collection with -t because the core does not work (I get an Error 404). )
The connector starts and logs the following:
I don't know what to do with this. MongoDB is up and running:
and the designated collection has several thousand items in it:
Is rs0 setup wrong?
And solr is also up and running:
I really don't know what I am doing wrong. Would be great if someone could point me in the right direction. 🙏
The text was updated successfully, but these errors were encountered: