From 8f7e8b6ee29efadb7defb43e516a8d9116fc9b52 Mon Sep 17 00:00:00 2001 From: orbiter Date: Sat, 10 Mar 2007 23:31:36 +0000 Subject: [PATCH] auto-delete for not-fixable db error in crawl stacker. see also http://www.yacy-forum.de/viewtopic.php?p=32906#32906 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3467 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaCrawlStacker.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/de/anomic/plasma/plasmaCrawlStacker.java b/source/de/anomic/plasma/plasmaCrawlStacker.java index dface406d..86d966c59 100644 --- a/source/de/anomic/plasma/plasmaCrawlStacker.java +++ b/source/de/anomic/plasma/plasmaCrawlStacker.java @@ -676,7 +676,14 @@ public final class plasmaCrawlStacker { this.urlEntryCache = new kelondroCache(new kelondroFlexTable(cacheStacksPath, newCacheName, preloadTime, plasmaCrawlNURL.rowdef), true, false); } catch (IOException e) { e.printStackTrace(); - System.exit(-1); + // kill DB and try again + kelondroFlexTable.delete(cacheStacksPath, newCacheName); + try { + this.urlEntryCache = new kelondroCache(new kelondroFlexTable(cacheStacksPath, newCacheName, preloadTime, plasmaCrawlNURL.rowdef), true, false); + } catch (IOException ee) { + ee.printStackTrace(); + System.exit(-1); + } } } if (this.dbtype == QUEUE_DB_TYPE_TREE) {