-
Notifications
You must be signed in to change notification settings - Fork 47
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
Model is not selecting correct shard_group #65
Comments
What's an example of a call causing this? I also updated your question formatting for it was a bit easier for me to read. Let me know if I fudged anything. Also |
Am calling I might be wrong somewhere. In example |
You can see some working examples in the test code in this repository. You can't use |
Yeah.. I thought model's method But IMHO if this method is called automatically from the framework, it would be too good.. Thanks.. 👍 |
It would have to know what you wanted to do to do that step for you. Or automatically always look into all the shards. The package is meant to give you application level sharding, putting that control in your hands. Unlike something more akin to https://www.citusdata.com/ which is transparent to your application and you'd treat like a single database. |
When the model_config is configured like below, the router is always sending
None
from methoddb_for_read
. It uses hints to get the shard, but its always{exact_lookups = {}}
@model_config(shard_group='default', sharded_by_field='model_id')
Please help resolving the issue.
Right now Model am using is,
This is just for example, returning the shard db name.
The text was updated successfully, but these errors were encountered: