Affects Version/s: 7.4-SNAPSHOT
Fix Version/s: 7.4
Some INSERTs happen during ES indexing and cause conflicts (due to a deleted parent) but these jobs should actually be read-only.
The root cause is that when we don't find a complex property we create it on the fly, which should not be necessary as it was already created during document creation. If that happens on read, we should just return null. If that happens on write, we should create the complex property (in most code paths it's always previously created, except 1. if it was concurrently deleted or 2. there was a schema change and it's now required).
The issue was found on the following jobs :
Caused by: org.nuxeo.ecm.core.storage.ConcurrentUpdateStorageException: java.sql.BatchUpdateException: The INSERT statement conflicted with the FOREIGN KEY SAME TABLE constraint "hierarchy_parentid_hierarchy_fk". The conflict occurred in database "dbjabba4", table "dbo.hierarchy", column 'id'. at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCConnection.checkConcurrentUpdate(JDBCConnection.java:298) at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.insertSimpleRows(JDBCRowMapper.java:579) at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.writeCreates(JDBCRowMapper.java:481) at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.write(JDBCRowMapper.java:451)