changeset 5166:d80478608f48

MoinMoin/search/builtin.py searching does not require a lock, xapian allows several concurrent search connections.
author Dmitrii Miliaev <dimazest@gmail.com>
date Fri, 02 Oct 2009 14:56:40 +0200
parents 27e9ac3fc12b
children b86c7b348862
files MoinMoin/search/builtin.py
diffstat 1 files changed, 1 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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