# HG changeset patch # User Dmitrii Miliaev # Date 1254488200 -7200 # Node ID d80478608f489ab94025826edd1f778abb25e045 # Parent 27e9ac3fc12b1d58183cf2478a960d74d81382a8 MoinMoin/search/builtin.py searching does not require a lock, xapian allows several concurrent search connections. diff -r 27e9ac3fc12b -r d80478608f48 MoinMoin/search/builtin.py --- a/MoinMoin/search/builtin.py Tue Sep 29 11:33:59 2009 +0200 +++ b/MoinMoin/search/builtin.py Fri Oct 02 14:56:40 2009 +0200 @@ -123,7 +123,6 @@ self.sig_file = os.path.join(main_dir, 'complete') lock_dir = os.path.join(main_dir, 'index-lock') self.lock = lock.WriteLock(lock_dir, timeout=3600.0, readlocktimeout=60.0) - #self.read_lock = lock.ReadLock(lock_dir, timeout=3600.0) self.update_queue = PageQueue(request, main_dir, 'update-queue') self.remove_queue = PageQueue(request, main_dir, 'remove-queue') @@ -159,13 +158,7 @@ @param query: the search query objects to pass to the index """ - #if not self.read_lock.acquire(1.0): - # raise self.LockedException - #try: - hits = self._search(query, **kw) - #finally: - # self.read_lock.release() - return hits + return self._search(query, **kw) def update_page(self, pagename, now=1): """ Update a single page in the index