From: Jim Starkey Date: July 22 2009 1:15am Subject: Low Memory and Cycle Locking List-Archive: http://lists.mysql.com/falcon/796 Message-Id: <4A66682C.50706@NimbusDB.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Kevin raised the point that a problem with cycle locking is that records recovered during low memory handling are not available until the next cycle. This is true, but there is a simple workaround. As soon as a low memory condition is recognized, do a manual wake-up of the cycle manager thread. It will still have to wait for other threads with a cycle lock to finish, but none of these threads are going to block holding cycle locks except, perhaps, the thread that invoked the low memory operation. Given the very few places that record memory is allocated, a careful analysis might reveal that there is no danger of releasing the cycle lock at the point of memory allocation. The situations that the cycle manager primarily addresses is traversing record chains, which is generally unassociated with allocating new record objects.