Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/olpc/datastore/xapianindex.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/olpc/datastore/xapianindex.py')
-rw-r--r--src/olpc/datastore/xapianindex.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/olpc/datastore/xapianindex.py b/src/olpc/datastore/xapianindex.py
index d071eba..a859aa9 100644
--- a/src/olpc/datastore/xapianindex.py
+++ b/src/olpc/datastore/xapianindex.py
@@ -22,6 +22,7 @@ import time
import thread
import threading
import warnings
+import traceback
import secore
import xapian as _xapian # we need to modify the QueryParser
@@ -165,7 +166,11 @@ class IndexManager(object):
self.deltact += 1
if force or self.deltact > FLUSH_THRESHOLD:
with self._write_lock:
- self.write_index.flush()
+ try:
+ self.write_index.flush()
+ except Exception:
+ logging.error('Index flush failed:\n' + \
+ ''.join(traceback.format_exception(*sys.exc_info())))
#self.read_index.reopen()
self.deltact = 0
else: