Locking Flex Objects on Job Execution

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 is shared across Flex Enterprise and JEF.

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:

flex/shared/flex-enterprise/featureToggles/externalLockEnabled

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 Ooyala representative.

How to configure a plugin to use a lock type

ActionPluginConfiguration supports three types of lock types:
  • LockType.SHARED: other jobs can use the object (e.g. asset) while this job is executing. Multiple jobs can run using this object in SHARED status.
  • LockType.EXCLUSIVE: no other job can use the object while this job is executing.
  • LockType.NONE: no lock is required to run this job. This is the default if no lockType is configured.
https://help.ooyala.com/sites/all/libraries/dita/en/media-logistics/flex/dev/70/jef_lock_on_execution.html

Was this article helpful?