FeedsProcessor::clean() doesn't use batches even with large amounts of items to be deleted. This causes some deadlocks on one of our servers, so I found out that batching has been suggested for the method. I implemented a working version of using the batch API and now the import works correctly.

CommentFileSizeAuthor
#2 feeds_clean_batch_2731437-1.patch1.58 KBZeiP
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ZeiP created an issue. See original summary.

ZeiP’s picture

Attached is a working patch that does require some work to fit in properly.

MegaChriz’s picture

Great! Thanks for working on this. I know though that this issue has been reported before (but without patches if I remember well). If you can find the other issue, you could post your patch there and close this one as a duplicate.

I've yet to try out the patch, but I wondered why you hard-coded $parser->progress to be 0.53?

It would be great to have an automated test for this. Also, batch deleting could also be implemented for deleting items from the 'Delete items' page (import/x/delete).

MegaChriz’s picture