Skip to content
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

do restore_relations across transactions? #11

Open
gforcada opened this issue Jul 6, 2022 · 1 comment
Open

do restore_relations across transactions? #11

gforcada opened this issue Jul 6, 2022 · 1 comment

Comments

@gforcada
Copy link
Member

gforcada commented Jul 6, 2022

I'm trying to run c.relationhelpers.api.rebuild_relations on our database and it does the first 3 steps (store relations, purge them and clean up intids) but it has not enough memory for the fourth (restoring the relations).

We can of course increase the memory available, but looking at the code, could it be possible to make the restore process reentrant? i.e. that the process keeps committing the changes every x relations restored and removing them from the annotation so if it runs out of memory and the process is killed, the restore process can be continued rather than started from the very beginning?

The code is quite large, so I'm not sure if that's possible at all 🤔

@pbauer as you mostly wrote it, would a PR towards that direction welcomed? 😄

@gforcada
Copy link
Member Author

gforcada commented Jul 6, 2022

Another thing that is not completely clear to me is if store_relations and purge_relations are fine to be run as isolated steps, and same goes with cleanup_intids ?

I'm expecting that the first and last (store relations and cleanup intids) are, but not sure about the purge relations...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant