Author: bobsan
Date: 2006-03-13 03:29:19 +0000 (Mon, 13 Mar 2006)
New Revision: 8237

Modified:
   trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
Log:
fix for exception in datastore insertion reported by <TheSeeker>  on IRC
Changes are local to the file and appear to be safe.


Modified: trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
===================================================================
--- trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2006-03-13 
01:18:06 UTC (rev 8236)
+++ trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2006-03-13 
03:29:19 UTC (rev 8237)
@@ -53,7 +53,7 @@
        private final TupleBinding storeBlockTupleBinding;
        private final TupleBinding longTupleBinding;

-       private int chkBlocksInStore;
+       private long chkBlocksInStore;
        private long maxChkBlocks;
        private final Database chkDB;
        private final Database chkDB_accessTime;
@@ -645,12 +645,12 @@
                }
     }

-    private int countCHKBlocks() {
-       int count =0;
+    private long countCHKBlocks() {
+       long count =0;
        try{
                Logger.minor(this, "Started counting items in database");

-               count = 
(int)((BtreeStats)chkDB.getStats(null)).getLeafNodeCount();
+               count = ((BtreeStats)chkDB.getStats(null)).getLeafNodeCount();

                Logger.minor(this, "Counted "+count+" items in database");
        }catch(DatabaseException ex){


Reply via email to