Because of core bug #600836: Batch API never terminates if you set $context['finished'] > 1 which was never backported to Drupal 6, if a $context['finished'] value greater than 1 is returned, then this causes an infinite loop. This can be triggered by a new node being added while a batch operation running on the entire node table is being run. This has been exposed in an actual contrib module with #1291898: Rebuild processing imaginary nodes so let's make sure people are aware of this issue in the batch example.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 1374196-do-not-test.patch | 1.18 KB | rfay |
| #3 | 1374196-batch-finished-greater.patch | 1.18 KB | rfay |
| #3 | 1374196-do-not-test.patch | 1.18 KB | rfay |
| #1 | 1374196-batch-finished-greater.patch | 1.18 KB | dave reid |
Comments
Comment #1
dave reidI don't believe this can be tested, so let's just comment the heck out of it.
Comment #2
geerlingguy commentedLooks good to me.
Comment #3
rfayResubmitting same patch to make sure testing system accepts it.
Comment #4
rfaySorry to make a mess of this issue, but using it for testing.
Comment #5
rfayWell, anyway. I committed it.
http://drupalcode.org/project/examples/commitdiff/7b4cb24
Thanks so much!