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

Comments

Projects
None yet
2 participants
@bartoszwalacik
Contributor

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

Merge pull request #17 from polyjdbc/16_key_generator_per_instances
fixing #16 - one sequence generator per PolyJDBC instance

@adamdubiel adamdubiel closed this Feb 1, 2016

@adamdubiel

This comment has been minimized.

Member

adamdubiel commented Feb 1, 2016

Fixed & release: 0.6.1

@bartoszwalacik

This comment has been minimized.

Contributor

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