Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-10-04 16:46:31 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-10-04 18:34:04 (GMT)
commit419929087705c924f2ddf9cb7e70946d28456d08 (patch)
treee28f7f5af83b5de3daf670bca20bb096df189efe
parentc83e94d1d6151324ae51d73306e0928b34623936 (diff)
Revert #3180: Recreate the index on mount failure.
-rw-r--r--NEWS1
-rw-r--r--src/olpc/datastore/backingstore.py22
2 files changed, 1 insertions, 22 deletions
diff --git a/NEWS b/NEWS
index 7181f42..d4b7143 100644
--- a/NEWS
+++ b/NEWS
@@ -20,7 +20,6 @@ Snapshot ea13f75d6a
Snapshot 7655f4d99a
-* #3180: Recreate the index on mount failure. (tomeu)
* #3374: Don't create another entry during async update. (tomeu)
* #3058: Disable content indexing for Trial-3. (tomeu)
diff --git a/src/olpc/datastore/backingstore.py b/src/olpc/datastore/backingstore.py
index dc6b2ef..b1ecbef 100644
--- a/src/olpc/datastore/backingstore.py
+++ b/src/olpc/datastore/backingstore.py
@@ -305,27 +305,7 @@ class FileBackingStore(BackingStore):
# This will ensure the fulltext and so on are all assigned
im.bind_to(self)
-
- try:
- im.connect(index_name)
- except Exception, e:
- # TODO: Try to recover in a smarter way than deleting the base
- # dir and reinitializing the index.
-
- logging.error('Error while trying to load mount point %s: %s. ' \
- 'Will try to renitialize and load again.' % (self.base, e))
-
- # Delete the base dir and its contents
- for root, dirs, files in os.walk(self.base, topdown=False):
- for name in files:
- os.remove(os.path.join(root, name))
- for name in dirs:
- os.rmdir(os.path.join(root, name))
- os.rmdir(root)
-
- self.initialize()
- self.load()
- return
+ im.connect(index_name)
self.indexmanager = im