Author: toad
Date: 2007-03-15 19:51:32 +0000 (Thu, 15 Mar 2007)
New Revision: 12133

Modified:
   trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
Log:
Remove dontCheckOnShrink, doesn't make any sense

Modified: trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
===================================================================
--- trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2007-03-15 
19:42:44 UTC (rev 12132)
+++ trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2007-03-15 
19:51:32 UTC (rev 12133)
@@ -532,8 +532,6 @@
                                storeFile.createNewFile();
                        chkStore = new RandomAccessFile(storeFile,"rw");

-                       boolean dontCheckOnShrink = false;
-                       
                        long chkBlocksInDatabase = chkDB.count();
                        chkBlocksInStore = chkBlocksInDatabase;
                        long chkBlocksFromFile = countCHKBlocksFromFile();
@@ -552,7 +550,6 @@
                                        throw new DatabaseException("Keys in 
database: "+chkBlocksInStore+" but keys in file: "+chkBlocksFromFile);
                                } else if(!noCheck) {
                                        long len = 
checkForHoles(chkBlocksFromFile, false);
-                                       dontCheckOnShrink = true;
                                        if(len < chkBlocksFromFile) {
                                                System.err.println("Truncating 
to "+len+" as no non-holes after that point");
                                                chkStore.setLength(len * 
(dataBlockSize + headerBlockSize));
@@ -566,7 +563,7 @@
                        System.out.println("Keys in store: db 
"+chkBlocksInDatabase+" file "+chkBlocksFromFile+" / max "+maxChkBlocks);

                        if(!noCheck) {
-                               maybeShrink(dontCheckOnShrink, true);
+                               maybeShrink(true, true);
                                chkBlocksFromFile = countCHKBlocksFromFile();
                                chkBlocksInStore = Math.max(chkBlocksInStore, 
chkBlocksFromFile);
                        }


Reply via email to