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

Add spring-batch sequence for sql server... #834

Closed
wants to merge 1 commit into from

Conversation

NEONKID
Copy link
Contributor

@NEONKID NEONKID commented Feb 15, 2019

Fixed #800

@chrisknoll
Copy link
Collaborator

So, I'm a little concerned about this change: Spring Batch is just a third party library that provided the DDL for the various platforms (sql, postgresql, oracle) and I'm not sure if we should change the published DDL that they provided to use sequences.

@pavgra do you have any thoughts?

@pavgra
Copy link
Contributor

pavgra commented Feb 19, 2019

I would also not touch the tables managed by a separate module (Spring Batch in this case)

@chrisknoll
Copy link
Collaborator

Ok, thanks @pavgra .

@NEONKID : I think we should close this PR since we don't want to change the tables defined by the external library.

@NEONKID
Copy link
Contributor Author

NEONKID commented Feb 19, 2019

Good. I agree with this and I will close this PR.

@chrisknoll
Copy link
Collaborator

Re-opening this PR. There is a known issue with SQL Server and using table-based sequences. The issue is described at a higher-level in the spring framework here: spring-projects/spring-framework#21425. However, I believe there are extension 'hooks' in spring batch allowing you to provide a custom implemenation of the key generator: the custom generator would do a select next value for {sequence} call instead of using the _SEQ tables.

All the work in this PR at the database-level to migrate from the table sequences to the sequence-based sequences can stay. The missing part is overriding the key generator in the event it is SQLServer.

If we decide to drop MSSQL/Oracle support in WebAPI (ie: everything is based on postgresql), this issue becomes moot. However, I don't think we have official position on this change, so we may still need to keep MSSQL and Oracle supported. (Would be easier for us to simply support postgresql, but this may be a change that is introduced in the 3.0 release, and not 2.8).

@chrisknoll
Copy link
Collaborator

Going to close this for now, since it's more involved to get spring batch sequences implemented on SQL Server, and we will probably be focusing on Postgres for WebAPI.

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

Successfully merging this pull request may close these issues.

SQL Server batch job sequence tables
4 participants