Package org.camunda.bpm.engine.impl
Class HistoryLevelSetupCommand
java.lang.Object
org.camunda.bpm.engine.impl.HistoryLevelSetupCommand
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
acquireExclusiveLock
(CommandContext commandContext) protected void
checkStartupLockExists
(CommandContext commandContext) static Integer
databaseHistoryLevel
(CommandContext commandContext) static void
dbCreateHistoryLevel
(CommandContext commandContext) protected void
determineAutoHistoryLevel
(ProcessEngineConfigurationImpl engineConfiguration, HistoryLevel databaseHistoryLevel) execute
(CommandContext commandContext) boolean
When CockroachDB is used, this command may be retried multiple times until it is successful, or the retries are exhausted.
-
Constructor Details
-
HistoryLevelSetupCommand
public HistoryLevelSetupCommand()
-
-
Method Details
-
execute
-
dbCreateHistoryLevel
-
databaseHistoryLevel
- Returns:
- Integer value representing the history level or
null
if none found
-
determineAutoHistoryLevel
protected void determineAutoHistoryLevel(ProcessEngineConfigurationImpl engineConfiguration, HistoryLevel databaseHistoryLevel) -
checkStartupLockExists
-
acquireExclusiveLock
-
isRetryable
public boolean isRetryable()When CockroachDB is used, this command may be retried multiple times until it is successful, or the retries are exhausted. CockroachDB uses a stricter, SERIALIZABLE transaction isolation which ensures a serialized manner of transaction execution. A concurrent transaction that attempts to modify the same data as another transaction is required to abort, rollback and retry. This also makes our use-case of pessimistic locks redundant since we only use them as synchronization barriers, and not to lock actual data which would protect it from concurrent modifications. The HistoryLevelSetup command only executes internal code, so we are certain that a retry of a failed command will not impact user data, and may be performed multiple times.- Specified by:
isRetryable
in interfaceCommand<Void>
- Returns:
- true if the
CrdbTransactionRetryInterceptor
can make a transparent retry of this command upon failure with aCrdbTransactionRetryException
(only used when running on CockroachDB).
-