]
Cheng Fang resolved WFLY-5134.
------------------------------
Resolution: Done
WFLY-5174 Upgrade jberet-core to 1.2.0.Beta1 has been merged into WildFly 10
Error creating Batch JDBC storage in domain
-------------------------------------------
Key: WFLY-5134
URL:
https://issues.jboss.org/browse/WFLY-5134
Project: WildFly
Issue Type: Bug
Components: Batch
Affects Versions: 10.0.0.Beta1
Environment: Oracle, DB2, Derby, Sybase, Firebird, and SQL Server databases
Reporter: Jan Martiska
Assignee: Cheng Fang
When multiple servers (eg. a server-group in a JBoss domain) attempt to create a JDBC
Batch repository at once, and they share a common database, they race in creating the
database tables, because sometimes instance A will create the table PARTITION_EXECUTION
after instance B invokes the check whether this table exists (this check is used to decide
whether all tables need to be created) - therefore B will decide to create all tables
too.
If the database doesn't support the IF NOT EXISTS clause in CREATE TABLE (db2,
oracle, sybase..), it will probably lead to a failure like 'table already exists',
which in turn rolls back the creation of the JDBC store on all nodes in the domain,
including those where the schema creation succeeded or was skipped. The tables remain
physically in the database.
This is similar to WFLY-5061, but this time, it is caused by having multiple servers in a
domain.
Sharing a common database in domain mode should work because it is useful for restarting
failed jobs on different nodes if one node crashes.