READ_COMMITTED Isolation Level on Mysql and Camunda Engine

Hi -
I am new to the Camunda community. In reading through the database setup - the recommended isolation-level is read-committed.

We like to use Statement binlog replication in our shop for a # of reasons and Mysql does not like the isolation-level with the binlog strategy (I’ll have an open question to Oracle about this as well).

Is the isolation-setting a recommendation or a requirement? If the former what parts of the engine take advantage of the reduced locking and could they be supported in other ways (additional indicies, etc)? If the later - what parts of the design/implementation rely on the isolation level to function correctly?

Is this required for all data-sources?

Best Regards,
Chris

It’s a recommendation in the sense that we do not develop for and test Camunda with other isolation levels. It’s a requirement with respect to bug fixes, i.e. we can’t fix bugs caused by a different isolation level (again, because we don’t test this).

This is hard to answer. From experience, we’ve seen deadlock situations caused by a more strict isolation level in the past. Your best bet would be to run the engine test suite with your desired isolation level, add additional tests for your specific scenarios and then resolve any upcoming issues.

Again, hard to answer specifically. In general, every Camunda command works in the following fashion:

  1. Start transaction
  2. Make arbitrary selects in any order (=> a command can invoke user code which could in turn make in any kind of query); these are mostly not SELECT FOR UPDATE statements.
  3. Collect any selected entities in a cache; any entity update therefore goes into the cache at first
  4. When all business logic is done, flush the entity cache by issueing modifying SQL statements in a consistent order (ordered by table and primary key, respecting foreign key constraints). These are mostly updates of individual rows, addressed by their primary keys. There also a couple of range updates.
  5. Commit transaction

Maybe this helps you reason about the possibility for deadlocks with the isolation level you have in mind and the kind of locks it involves.

Best regards,
Thorben

Thanks for the elaboration, Thorben.