On a fresh Galera MariaDB cluster, the OCL module’s saveMapping() method hits deadlock error 1213 due to concurrent Galera certification conflicts and has zero retry logic the exception is caught, wrapped in ImportException, and the mapping is permanently recorded as ItemState.ERROR. On first boot, this floods logs with hundreds of deadlock stack traces and permanently skips a small fraction of mappings.
saveConcept() has a single generic retry (2 attempts max) but no deadlock-specific handling it catches any Exception with no backoff or error-code check.
Proposed fix
Retry saveMapping() on SQLTransactionRollbackException (error 1213) with exponential backoff. Deadlock retry is a well-established pattern for Galera transient conflicts resolve within milliseconds and a retry immediately succeeds.