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

New MigrationState RUNNING #632

Closed
ptahchiev opened this issue Oct 23, 2013 · 3 comments
Closed

New MigrationState RUNNING #632

ptahchiev opened this issue Oct 23, 2013 · 3 comments

Comments

@ptahchiev
Copy link

Hi guys,

I would love to see a new MigrationState, called RUNNING (or equivalent). The idea behind this would be so I can check if someone has started database migration. If the database migration has been started I can show the user a "Down for maintenance" page, I can stop any cronjobs that interact with the database, etc, and thus keep the consistent state of the data in the db.

@axelfontaine
Copy link
Contributor

Thanks for your suggestion. This is something I tried to implement a while ago and failed. It is quite tricky once multiple nodes are involved, as the concurrency is managed by a lock. Once you commit the state, the lock is released.

So yes, I'm in favor of this, but I suspect it will be either very hard or impossible to achieve. I'll leave the issue open for now. Pull request welcome.

Cheers
Axel

@ptahchiev
Copy link
Author

Oh, that sounds not so promising. I would imagine it gets really complicated once multiple nodes are involved, but (and i'm really lame-speaking here), can it not be done one node at a time. Say you mark the status as RUNNING, when you start migration of node1. At that time all the other nodes should be working fine, then when node1 is finished, you move to node2, etc.. until all the nodes are done, and then we mark the status as FINISHED. Again, I've probably understood it completely wrong, but it seems to me this should be the way to go.

@axelfontaine
Copy link
Contributor

Closing as this doesn't seem doable for now. Also the original motivation can be achieved using callbacks.

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

No branches or pull requests

2 participants