Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
7.3.X, Master
-
7.3.x
-
Committed
-
3
Description
Reproducing Steps
- Start Liferay.
- Go to Control Panel > SYSTEM > Virtual Instances and add a new virtual instance.
- Restart Liferay.
- Look at the startup log.
Expected: The startup log shows no errors.
Observed: The startup log can show anĀ ERROR: duplicate key value violates unique constraint "ix_228562ad" related to background task WorkflowMetricsIndexCreator
2021-05-31 15:01:22.196 ERROR [liferay/background_task-2][JDBCExceptionReporter:234] Batch entry 0 insert into Lock_ (mvccVersion, uuid_, companyId, userId, userName, createDate, className, key_, owner, inheritable, expirationDate, lockId) values (0, '01a0fdd6-0b92-f95f-fa4d-188a330ae57b', 20102, 0, NULL, '2021-05-31 15:01:22.097+00', 'com.liferay.portal.kernel.backgroundtask.BackgroundTaskExecutor', 'com.liferay.portal.workflow.metrics.internal.background.task.WorkflowMetricsReindexBackgroundTaskExecutor#WorkflowMetricsIndexCreator', 'WorkflowMetricsIndexCreator#79305', 'FALSE', NULL, 79307) was aborted: ERROR: duplicate key value violates unique constraint "ix_228562ad"_ Detail: Key (classname, key_)=(com.liferay.portal.kernel.backgroundtask.BackgroundTaskExecutor, com.liferay.portal.workflow.metrics.internal.background.task.WorkflowMetricsReindexBackgroundTaskExecutor#WorkflowMetricsIndexCreator) already exists. Call getNextException to see other errors in the batch. [Sanitized] 2021-05-31 15:01:22.197 ERROR [liferay/background_task-2][JDBCExceptionReporter:234] ERROR: duplicate key value violates unique constraint "ix_228562ad"_ Detail: Key (classname, key_)=(com.liferay.portal.kernel.backgroundtask.BackgroundTaskExecutor, com.liferay.portal.workflow.metrics.internal.background.task.WorkflowMetricsReindexBackgroundTaskExecutor#WorkflowMetricsIndexCreator) already exists. [Sanitized] 2021-05-31 15:01:22.202 INFO [liferay/background_task-2][LockLocalServiceImpl:308] Unable to acquire lock, retrying 2021-05-31 15:01:22.261 INFO [liferay/background_task-2][BackgroundTaskMessageListener:151] Unable to acquire lock, queuing background task 79305
Note: The problem is not systematic. An error in the logs can be forced with the attached script. WorkflowMetricsIndexCreatorRemoveCreateIndices.groovy
Attachments
Issue Links
- is duplicated by
-
LPS-133737 Use company isolation level in background tasks for reindexing workflow metrics
- Closed