Author: toad
Date: 2007-08-17 23:59:19 +0000 (Fri, 17 Aug 2007)
New Revision: 14779

Modified:
   trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
Log:
restart, don't exit

Modified: trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
===================================================================
--- trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2007-08-17 
23:57:11 UTC (rev 14778)
+++ trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2007-08-17 
23:59:19 UTC (rev 14779)
@@ -1805,11 +1805,13 @@
                                }
                                Logger.error(this, "Corrupt secondary database 
("+getName()+"). Should be cleaned up on restart.");
                                System.err.println("Corrupt secondary database 
("+getName()+"). Should be cleaned up on restart.");
+                               WrapperManager.restart();
                                
System.exit(freenet.node.NodeInitException.EXIT_DATABASE_REQUIRES_RESTART);
                        } else if(ex instanceof DbChecksumException || ex 
instanceof RunRecoveryException || ex instanceof LogFileNotFoundException ||
                                        // UGH! We really shouldn't have to do 
this ... :(
                                        (msg != null && 
-                                                       
(msg.indexOf("LogFileNotFoundException") >= 0 || 
msg.indexOf("DbChecksumException") >= 0))) {
+                                                       
(msg.indexOf("LogFileNotFoundException") >= 0 || 
msg.indexOf("DbChecksumException") >= 0)
+                                                       || 
msg.indexOf("RunRecoveryException") >= 0)) {
                                System.err.println("Corrupt database! Will be 
reconstructed on restart");
                                try {
                                        reconstructFile.createNewFile();


Reply via email to