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

Issue fork orange_dam-3422764

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

apotek created an issue. See original summary.

apotek’s picture

Status: Active » Needs review

Merge request is up:

We still get this notification:

[warning] Unable to find migrated content having “JF11978345” as a source id while processing the deletion queue.

But the queue item is released from the queue….

 select * from queue where data like ‘%JF11978345%’;
[nada]

So it will not be run again and again ...

apotek’s picture

Status: Needs review » Reviewed & tested by the community
apotek’s picture

Status: Reviewed & tested by the community » Fixed
apotek’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.