You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JobExplorer.getJobInstances() returns instances ordered descending by ID, but ids generated by sequences are unordered, so also job instances are unordered (newer job may have lower ID than older job).
The problem is that provided DDL doesn't specify order on sequences and Oracle sequences are unordered by default.
To fix that DDL for sequences has to have ORDER specified. This will ensure that job ids reflect their creation order, which is very important when one wants to find the last successful job execution to do incremental export.
The first line of macro in oracle10g.vpp sholud be:
#macro (sequence $name $value)CREATE SEQUENCE ${name} START WITH ${value} MINVALUE 0 MAXVALUE 9223372036854775807 ORDER NOCYCLE;
The issue probably affects also newer versions.
If there is any reason why the sequences are unordered please let me know.
fmbenhassine
changed the title
Batch sequences generate unordered ids, which relusts in unordered instances returned by JobExplorer [BATCH-2177]
Batch sequences generate unordered ids, which results in unordered instances returned by JobExplorer [BATCH-2177]
Jan 26, 2021
Przemysław Wojnowski opened BATCH-2177 and commented
JobExplorer.getJobInstances() returns instances ordered descending by ID, but ids generated by sequences are unordered, so also job instances are unordered (newer job may have lower ID than older job).
The problem is that provided DDL doesn't specify order on sequences and Oracle sequences are unordered by default.
To fix that DDL for sequences has to have ORDER specified. This will ensure that job ids reflect their creation order, which is very important when one wants to find the last successful job execution to do incremental export.
The first line of macro in oracle10g.vpp sholud be:
The issue probably affects also newer versions.
If there is any reason why the sequences are unordered please let me know.
Affects: 2.1.9
Reference URL: http://forum.spring.io/forum/spring-projects/batch/744526-passing-last-successful-export-date-to-sql-where-clause
The text was updated successfully, but these errors were encountered: