Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-133327

Possible unique constraint violation IX_228562AD for WorkflowMetricsIndexCreator having more than one virtual instance

Details

    Description

      Reproducing Steps

      1. Start Liferay.
      2. Go to Control Panel > SYSTEM > Virtual Instances and add a new virtual instance.
      3. Restart Liferay.
      4. 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

          Activity

            People

              rodrigo.cunha Rodrigo Cunha (Inactive)
              ricardo.couso Ricardo Couso
              Kiyoshi Lee Kiyoshi Lee
              Ricardo Couso Ricardo Couso
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                1 year, 50 weeks ago

                Packages

                  Version Package
                  7.3.10.3 DXP SP3
                  7.3.X
                  7.4.13 DXP GA1
                  Master