Needs work
Project:
Radioactivity
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Oct 2012 at 13:43 UTC
Updated:
25 Mar 2015 at 02:01 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pdrake commentedThis patch adds the option to process the update query in a batch format where a limited number of rows are processed per update hook. This is important because the query requires a full table scan which will ultimately lock every record in the table and the update query can take an appreciable amount of time on a large table. Processing in batches, combined with the new index, requires a lock on only a few records at a time. On busy sites, the time taken while locking the table can result in deadlocks or lock wait timeouts. By default, this query will behave as it did before, unless radioactivity_decay_batch_size is set. Additionally, I have wrapped the entire function in a lock_acquire to ensure this function is not called multiple times concurrently as that is a sure-fire way to cause deadlocks.
Comment #2
bropp commentedWas getting this error in the 7.x branch as well, so rolled a patch based off of the one in #1.
It's not perfect and uses db_query because D7 doesn't support LIMIT in update queries. I haven't tested it on redis/memcache installs either. Otherwise, appears to be working.
Comment #3
bropp commentedPatch attached.