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

Intended behaviour current_shard #487

Open
peterbrouwer opened this issue Apr 14, 2018 · 0 comments
Open

Intended behaviour current_shard #487

peterbrouwer opened this issue Apr 14, 2018 · 0 comments

Comments

@peterbrouwer
Copy link

Hi,

In version 0.8.4 octopus keeps the current_shard stored across queries, so for example in the rails console:

User.using(:my_shard).count # This will do a query on :my_shard
User.count # This will also do a query on :my_shard

In later versions (> 0.8.4) this behaviour has disappeared. And in the example above the second query will revert to using the master shard. Was this changed intentionally? Would it be an idea to make this behaviour configurable in octopus, to provide users an easier upgrade path?

Cheers

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