]
Kabir Khan updated WFLY-5134:
-----------------------------
Fix Version/s: 10.0.0.Final
I am bulk closing old issues that were resolved with no fix version. There are quite many
of these so I am not checking the history properly. From the lastModified date of this
issue it looks like it was done for 10.0.0.Final (I am not caring about alpha/beta etc.
for this exercise). If that is incorrect please adjust as needed.
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
Fix For: 10.0.0.Final
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.