Author: nextgens
Date: 2007-02-23 18:11:16 +0000 (Fri, 23 Feb 2007)
New Revision: 11902

Modified:
   trunk/freenet/src/freenet/node/Node.java
Log:
DOH!!!!! maybe fix the root cause of our BDB memory usage problem.

Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java    2007-02-22 15:29:02 UTC (rev 
11901)
+++ trunk/freenet/src/freenet/node/Node.java    2007-02-23 18:11:16 UTC (rev 
11902)
@@ -1305,6 +1305,11 @@
                                if(val < 0)
                                        throw new 
InvalidConfigValueException("Negative or zero values not supported");
                                envMutableConfig.setCacheSize(val);
+                               try{
+                                       
storeEnvironment.setMutableConfig(envMutableConfig);
+                               } catch (DatabaseException e) {
+                                       throw new 
InvalidConfigValueException("Error while applying the new config : 
"+e.getMessage());
+                               }
                                databaseMaxMemory = val;
                        }

@@ -1314,6 +1319,14 @@
                databaseMaxMemory = nodeConfig.getLong("databaseMaxMemory");
                envMutableConfig.setCacheSize(databaseMaxMemory);

+               try {
+                       storeEnvironment.setMutableConfig(envMutableConfig);
+               } catch (DatabaseException e) {
+                       System.err.println("Could not set the database 
configuration: "+e);
+                       e.printStackTrace();
+                       throw new NodeInitException(EXIT_STORE_OTHER, 
e.getMessage());                  
+               }
+               
                String suffix = "-" + portNumber;

                try {


Reply via email to