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

Replica + PostgresShardGeneratedIDAutoField fails #71

Open
M1ha-Shvn opened this issue Dec 11, 2017 · 4 comments
Open

Replica + PostgresShardGeneratedIDAutoField fails #71

M1ha-Shvn opened this issue Dec 11, 2017 · 4 comments

Comments

@M1ha-Shvn
Copy link

M1ha-Shvn commented Dec 11, 2017

Hello.
Here's a bug:
image
The problem occures, if I add replica to one of the shards, and use PostgresShardGeneratedIDAutoFieldat the same time. The reason is, that replicas have no SHARD_ID assigned, and iteration raises KeyError.

@M1ha-Shvn M1ha-Shvn changed the title Replica + PostgresShardGeneratedIDAutoField failse Replica + PostgresShardGeneratedIDAutoField fails Dec 11, 2017
@M1ha-Shvn
Copy link
Author

I suppose, it should be db_settings.get('SHARD_ID') if replica is ignored, or something based on RountingStartegy, if replica is used.

@JBKahn
Copy link
Owner

JBKahn commented Dec 11, 2017

Good catch, I'll update it in addition to the others. It's a busy few weeks for me right now but I'll slot in some time soon.

@M1ha-Shvn
Copy link
Author

A year has passed. Any updates on this issue?

@JBKahn
Copy link
Owner

JBKahn commented Dec 3, 2018

Yeah, I'll get on this. Sorry I've been rather busy and when it wasn't the holiday season it slipped my mind.

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

2 participants