Don't re-queue failed items now that most race conditions are handled

Created on 20 February 2024, 4 months ago
Updated 5 March 2024, 4 months ago

Problem/Motivation

Now that the pre-delete event is firing for the deletion queue, and we are attempting to synchronize the deletion queue with the incoming items, it is much less useful, and probably just disruptive, to re-queue deletion queue items that have not found content to delete.

There are lot of use cases where items could be marked for deletion in Orange Logic where those items never were migrated to the destination (for example, a content type that is excluded from migration). Since the deletion API does not allow for filtering by only desired content types, it's entirely possible for the deletion queue to be filled with items that never migrated. Since those items are being re-queued on failure-to-delete, the queue (and logs!) fill up with unresolvable issues, even though there is no real error.

Proposed resolution

Don't throw an Exception from the queue worker if the item could not be deleted. Expect that the majority (or at least common case) is that deletion will fail to find an item to delete (for the aforementioned reasons).

We can skip re-queuing now because the module does a decent job at handling the potential race conditions between incoming items and to-be-deleted items via the pre-delete event.

Remaining tasks

Code the change.

User interface changes

No UI changes. But there are many ways to improve the log output.

API changes

none

Data model changes

none

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States apotek

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024