Revision Manager Duplicate Entry

Created on 25 August 2025, 5 days ago

Problem/Motivation

The revision_manager module has a race condition in QueueGenerator::enqueueIfUnique()
method. Multiple processes (cron runs, batch operations, manual triggers) can
simultaneously attempt to queue the same entity for revision cleanup, causing:

  • Process A checks if key exists β†’ FALSE
  • Process B checks if key exists β†’ FALSE
  • Both processes attempt to INSERT the same primary key β†’ Database constraint violation

Proposed resolution

Add exception handling to gracefully handle the duplicate key scenario:

  • Catch Duplicate entry database exceptions
  • Return FALSE to indicate item was already queued by another process
  • Maintain existing error handling for other exception types
πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States j-barnes

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024