If a node doesn't exist for any reason, then the deletion of the items of a feeds continues till infinity. The _feeds_node_delete function should check to see if the $node object is empty and remove from the feeds_node_item table if the node could not be located any more.

CommentFileSizeAuthor
#2 feeds-743528.patch1.19 KBSouvent22
#1 feeds-743528.patch1.19 KBSouvent22

Comments

Souvent22’s picture

StatusFileSize
new1.19 KB

Inital patch attached.

Souvent22’s picture

StatusFileSize
new1.19 KB

Verbage updated and typo fixed.

alex_b’s picture

Status: Active » Needs work

Hm - I am actually wondering why this happens in the first place - see _feeds_nodeapi_node_processor() and FNP::clear(). Any ideas?

Souvent22’s picture

This was a side effect of #736684: FeedsDateTime & Batch DateTime causes core dumps when the crashes were happening due to the serialization of the item. I believe during the batch it was failing and thus the node wasn't saved; since nid is not required, an entry went into the table, but had no nid. So this is more a "sanity" check. However, with that issue fixed, this should be an issue. But, if this situation does occur, I experienced, for all intents and purposes, and infinite loop when trying to delete all associated feed-items of a feed to "reset" and re-import the feed items.

Again, at this point, this is just a nice "sanity" check to raise an error if for some reason this situation arises. I apologize for not having the full work-flow of how the issue presented itself in front of me. I can roll back the patch the fixed this issue though and re-create it and get back to you with the exact work-flow if you want. Blah, I should of put the exact workflow in this ticket when I first opened it in the first place.

dave reid’s picture

Status: Needs work » Fixed

Makes sense and it's easy to wrap the $node = node_load() in an if to protect this. Fixed in Git with http://drupalcode.org/project/feeds.git/commit/731ab1c. Does not need to be ported to 7.x-2.x.

Status: Fixed » Closed (fixed)

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