-
Notifications
You must be signed in to change notification settings - Fork 192
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
[Testing] Test that the migrated database works as expected #2789
Comments
@giovannipizzi @sphuber So it needs some investigation of what went wrong. |
The files were added to the common GDrive (MARVEL and AiiDA/AiiDA/AiiDA Django JSONB/migration problems) The attributes and the extras of all the nodes belonging to a specific group were printed before and after the JSONB migration. So the problem is that several nodes after the migration have null value in their attributes and extras. The database is the one that I got from Davide and can be found at theospc22 - I can give access to whoever wants to have a look (I will also look into this). |
The problem with the migration was that the llazy fetcher that was retrieving nodes to migrate in batches was not sorting the query sets in any way. The result is that if your node count is larger than the batch size, which is currently a 1000, then you run the risk of fetching the same node twice. Since the code fetches exactly as many nodes as there are in the databsae, this runs the risk of some nodes never being fetched and migrated. This is where the nodes without attributes comes from. Sorting the fetch batches by Original database
Broken migration
Fixed migration
As you can see, the new numbers match perfectly with that of the original database.
|
I also had a look at Seb's fix and indeed the sorting seems to fix the problem. I also compared the database that resulted from his final migration and checked for nodes that failed to migrate correctly in my initial attempt. All the nodes that I checked (I checked a few) had attributes and extras and also had the expected values.
|
Since a lot of information are migrated (attributes, extras and settings) it is good to get a project that has started in Django EAV and migrate it to Django JSONB and see if the calculations continue correctly and if the engine works as expected with the migration of the settings.
The text was updated successfully, but these errors were encountered: