Author: toad
Date: 2007-05-03 15:32:39 +0000 (Thu, 03 May 2007)
New Revision: 13122
Modified:
trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
Log:
Ignore DatabaseNotFoundException when removing database
Modified: trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
===================================================================
--- trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2007-05-03
09:45:02 UTC (rev 13121)
+++ trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2007-05-03
15:32:39 UTC (rev 13122)
@@ -512,7 +512,11 @@
System.err.println("Reconstructing access times
index...");
Logger.error(this, "Reconstructing access times
index...");
if(atime != null) atime.close();
- environment.removeDatabase(null,
prefix+"CHK_accessTime");
+ try {
+ environment.removeDatabase(null,
prefix+"CHK_accessTime");
+ } catch (DatabaseNotFoundException e1) {
+ // Ok
+ }
secDbConfig.setAllowCreate(true);
secDbConfig.setAllowPopulate(true);
atime = environment.openSecondaryDatabase
@@ -563,7 +567,11 @@
// it won't overflow ... or we debug the wrapper.
// NB: it might be a wrapper-version-missmatch problem
(nextgens)
if(blockNums != null) blockNums.close();
- environment.removeDatabase(null, prefix+"CHK_blockNum");
+ try {
+ environment.removeDatabase(null,
prefix+"CHK_blockNum");
+ } catch (DatabaseNotFoundException e1) {
+ // Ignore
+ }
System.err.println("Reconstructing block numbers
index...");
Logger.error(this, "Reconstructing block numbers
index...");
System.err.println("Creating new block DB index");