-
Notifications
You must be signed in to change notification settings - Fork 266
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
mongo driver migration to an officially supported one + moving Orion to CentOS 8 #3622
Conversation
Note that we have some part of CB using old mongo::BSON* classes and the other using orion::BSON* classes, we keep to separate connection pools:
Eventually, the old one will be removed and only the one with orion:: will remain. |
4335e0e
to
287144b
Compare
At commit 287144b initial implementation of mongoDriver and following files migrated:
Pending references to old driver outside mongoDriver (
Functional tests log (from my local)
|
a190514
to
c389579
Compare
At commit c389579, almost old the code migrated (only some parts in MongoGlobal remain):
Pending references to old driver outside mongoDriver (
Functional tests log (from travis):
Unit test are expected to fail. Probably it is the same problem at commit 287144b, solved using DISABLED. |
d377716
to
7df0fb4
Compare
At commit 7df0fb4, old code migrated. Pending references to old driver outside mongoDriver (
In addition, the following files has been removed from mongoBackend (no longer used):
With regards to this previous comment now the situation is:
Functional tests log (https://travis-ci.org/github/telefonicaid/fiware-orion/jobs/713271841)):
So the codebase is now ready to start with the driver migration work :) That will be done in a branch of feature/3132_poc_isolating_driver_usage The following tasks are deferred after driver migration:
|
Stage one done in Stage 1 done in PR #3772 Note that in that PR we are the C official driver instead of the C++ official driver. Originally the plan was to use the C++ driver. However, at the end we have used the C driver given the following reasons:
|
Having completed stage 1 (the most difficult one :), the plan from now on is as follows. Each stage in the plan will be done in a separate PR (using task/3132_* pull branch as branch of this feature/3132_poc_isolating_driver_usage)
After merging this PR #3622, some additional tasks have to be done:
|
…_first_stage FIX upgrade mongo legacy driver to a new one written in C
…_second_stage FIX code style and disable mongo unit test based in old driver
8f367a3
to
861665d
Compare
Update procedure for Ubuntu 20.04 LTS (amd64 and aarch64)
Merged. Thanks! That covers the first item. Regarding the second item:
It is not needed any adaptation in documents at the end? |
I'm working on the second item. I will send a PR for updating the documentation. |
Update function test procedure for Ubuntu
I sent a PR #3825. It updates documentation to support CentOS 8 aarch64 for Raspberry Pi. It would be great if you could review this PR. |
Add machine information in GET /version
…telefonicaid/fiware-orion into feature/3132_poc_isolating_driver_usage
06d93e5 is a "candidate commit" to merge this PR. Valgrind test pass:
Functional tests with cache:
Functional test without cache:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Several issues as been created as a consequence of the work on this PR, in some way or another (some of them are technical debt, some others are ideas for improvements). In particular these ones:
|
The merging of this PR is an important milestone in the Orion Context Broker development. We are getting rid of the old legacy driver (a very toxic and dangerous dependency that has been around for too many years) and start using an officially supported one (the Mongo C driver). Special thanks to @mapedraza and @fisuda for their contributions to this PR's branch. Also, special thanks to @bazile-clyde @kevinAlbs, from the MongoDB team, to help me to understand how the Mongo C driver works :) |
This PR is related with #3132 and provides the "wrapping modules" described in that issue.
At the present point, apart from a first version of the modules themselves (in the mongoDriver/ library) only a small part of the CB logic (in particular, the one related with subscription creation, update and retreival) has been migrated to use the new library.
The idea is to continue migrating more CB logic, enhancing mongoDriver/ in the process, if needed. This could be done either ini feature/3132_poc_isolating_driver_usage directly or as PR on that branch (contributions welcome! :)
Pay attention to the "FIXME OLD-DR" marks. They should be solved and removed before merging this PR into master.
Pending references to old driver outside mongoDriver (
grep '#include "mongo/' -R src/* | grep -v mongoDriver | wc -l
)