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

bug: sequence allocation algorithm has global, shared state #16

Closed
bartoszwalacik opened this issue Jan 31, 2016 · 2 comments
Closed

bug: sequence allocation algorithm has global, shared state #16

bartoszwalacik opened this issue Jan 31, 2016 · 2 comments

Comments

@bartoszwalacik
Copy link
Contributor

@bartoszwalacik bartoszwalacik commented Jan 31, 2016

since class KeyGeneratorRegistry has static map of SequenceAllocation objects,
current val of each sequence is global.

It means that new instance of PolyJDBC, feeded with new db connection, doesnt initiates
current states of sequences from db but takes stale values (possibly genereted for another database).

it causes pk vilation exceptions.

adamdubiel added a commit that referenced this issue Jan 31, 2016
adamdubiel added a commit that referenced this issue Jan 31, 2016
adamdubiel added a commit that referenced this issue Jan 31, 2016
adamdubiel added a commit that referenced this issue Feb 1, 2016
bartoszwalacik added a commit that referenced this issue Feb 1, 2016
fixing #16 - one sequence generator per PolyJDBC instance
@adamdubiel adamdubiel closed this Feb 1, 2016
@adamdubiel
Copy link
Member

@adamdubiel adamdubiel commented Feb 1, 2016

Fixed & release: 0.6.1

@bartoszwalacik
Copy link
Contributor Author

@bartoszwalacik bartoszwalacik commented Feb 1, 2016

thanks a lot for this super fast fix !

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

Successfully merging a pull request may close this issue.

None yet
2 participants