ZF-3615: Index cleanup never happens when the index directory is on a GFS mounted volume
If the index directory is on a GFS mounted volume, Zend_Search_Lucene will never perform an index cleanup even if there are no other processes (local or cluster-wide) using the index. The problem occurs in LockManager.php when it tries to escalate the read-lock from shared to exclusive. While GFS provides cluster-wide flock() support, and hence should be a supported filesystem, the implementation of the lock protocol used by GFS is not fully consistant with that used for EXT3 (local) filesystems. In particular, conditional lock requests to promote the lock from shared to exclusive fail even if we are the only process holding the shared lock. Furthermore, when the lock is demoted, there is an open window of opportunity between the time the exclusive lock is released and the shared lock is re-established. Tests have shown that it;s possible for another task to gaon exclusive control of the lock during that window (although it isn't likely to occur in LockManager).
We have used the attached patch to circumvent the problem