-
Bug
-
Resolution: Done
-
Major
-
7.0.0.DR8
-
None
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.