Author: toad
Date: 2006-08-05 16:00:37 +0000 (Sat, 05 Aug 2006)
New Revision: 9906
Modified:
trunk/freenet/src/freenet/node/Node.java
trunk/freenet/src/freenet/node/Version.java
Log:
930: Only move store -> cache if previous build didn't support split store.
Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java 2006-08-05 15:56:28 UTC (rev
9905)
+++ trunk/freenet/src/freenet/node/Node.java 2006-08-05 16:00:37 UTC (rev
9906)
@@ -1526,21 +1526,23 @@
File sskCacheFile = new File(sskCachePath);
// Upgrade
- if(chkStoreFile.exists() && !chkCacheFile.exists()) {
- System.err.println("Renaming CHK store to CHK cache.");
- if(!chkStoreFile.renameTo(chkCacheFile))
- throw new NodeInitException(EXIT_STORE_OTHER,
"Could not migrate to two level cache: Could not rename "+chkStoreFile+" to
"+chkCacheFile);
+ if(this.lastVersion < 927) {
+ if(chkStoreFile.exists() && !chkCacheFile.exists()) {
+ System.err.println("Renaming CHK store to CHK
cache.");
+ if(!chkStoreFile.renameTo(chkCacheFile))
+ throw new
NodeInitException(EXIT_STORE_OTHER, "Could not migrate to two level cache:
Could not rename "+chkStoreFile+" to "+chkCacheFile);
+ }
+ if(pkStoreFile.exists() && !pkCacheFile.exists()) {
+ System.err.println("Renaming PK store to PK
cache.");
+ if(!pkStoreFile.renameTo(pkCacheFile))
+ throw new
NodeInitException(EXIT_STORE_OTHER, "Could not migrate to two level cache:
Could not rename "+pkStoreFile+" to "+pkCacheFile);
+ }
+ if(sskStoreFile.exists() && !sskCacheFile.exists()) {
+ System.err.println("Renaming SSK store to SSK
cache.");
+ if(!sskStoreFile.renameTo(sskCacheFile))
+ throw new
NodeInitException(EXIT_STORE_OTHER, "Could not migrate to two level cache:
Could not rename "+sskStoreFile+" to "+sskCacheFile);
+ }
}
- if(pkStoreFile.exists() && !pkCacheFile.exists()) {
- System.err.println("Renaming PK store to PK cache.");
- if(!pkStoreFile.renameTo(pkCacheFile))
- throw new NodeInitException(EXIT_STORE_OTHER,
"Could not migrate to two level cache: Could not rename "+pkStoreFile+" to
"+pkCacheFile);
- }
- if(sskStoreFile.exists() && !sskCacheFile.exists()) {
- System.err.println("Renaming SSK store to SSK cache.");
- if(!sskStoreFile.renameTo(sskCacheFile))
- throw new NodeInitException(EXIT_STORE_OTHER,
"Could not migrate to two level cache: Could not rename "+sskStoreFile+" to
"+sskCacheFile);
- }
maxStoreKeys = (maxTotalKeys * 4) / 5;
maxCacheKeys = maxTotalKeys - maxStoreKeys;
Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-08-05 15:56:28 UTC (rev
9905)
+++ trunk/freenet/src/freenet/node/Version.java 2006-08-05 16:00:37 UTC (rev
9906)
@@ -18,7 +18,7 @@
public static final String protocolVersion = "1.0";
/** The build number of the current revision */
- private static final int buildNumber = 929;
+ private static final int buildNumber = 930;
/** Oldest build of Fred we will talk to */
private static final int oldLastGoodBuild = 874;