-
Notifications
You must be signed in to change notification settings - Fork 504
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
current shard is stack on slave #505
Labels
Comments
Hi @omerdoron1, Sorry for the late response - are you still using Octopus? did you manage to fix this issue? I believe it might be a bug - but, unfortunately, Octopus doesn't support Rails 3.x anymore. Thiago |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using Octopus 0.8.0 with Rails 3
After I am doing using(:slave), if by mistake I am trying to write I am getting errors of read_only user is trying to write to DB...
Then the current_shard of the connection proxy is stuck on the :slave shard
I thought to add this initializer to rails:
Does that make sense?
Is there any better way to achieve the reset of the current_shard to master after trying to write to slave?
Do you think I should add a middleware to rails that will reset the current_shard to master:
before each request and async job? For example:
The text was updated successfully, but these errors were encountered: