JEF now supports the same lock capabilities as Enterprise, but using the new distributed lock mechanism. The locking mechanism is a separate library, which can be included in any service or app, such as Flex Enterprise, Sync/Async job executor services etc. to acquire distributed locks.
The Enterprise legacy lock mechanism until Version 7.2.0 is based on MySQL.
The new distributed lock mechanism uses Redis and RabbitMQ, and is shared across Flex Enterprise and JEF. Lock changes are communicated back to Enterprise, and Enterprise publishes events for lock updates as usual.
If a JEF plugin must be locked, you can migrate from Enterprise Mysql to the new external lock mechanism. The same behaviour and functionality are supported in the new implementation. Please see Locks for more information.
The new external lock mechanism can be activated using the following consul key:
This value is set to false by default. The same internal MySql lock systems will be used, although this does not support new JEF plugins.
Important: if current locks are still running from async jobs started before the release upgrade when Enterprise was stopped, a migration of Mysql objects is required. Please contact your Dalet representative.
Multiple Locks: Flex Enterprise plugins
Enterprise plugins acquiring multiple locks are supported. If the job requires multiple objects to be locked, External Lock mechanism will attempt to acquire all object locks at an atomic operation. If any lock is not available, it will not acquire any and it will register for notification. When the object is released, it will try again to acquire all or none. This operation is repeated until all locks are acquired in an atomic operation.