* Persistent data store: Increase write limit from 300 to 600

so floodfill routers don't get backed up
This commit is contained in:
zzz
2008-08-20 15:02:56 +00:00
parent 258d01f0d9
commit 33e8abfc3e
2 changed files with 4 additions and 2 deletions

View File

@ -2,6 +2,8 @@
* Blocklists: Handle blank lines and \r\n in blocklist.txt * Blocklists: Handle blank lines and \r\n in blocklist.txt
* NTCP: Add connection limit, set by i2np.ntcp.maxConnections, * NTCP: Add connection limit, set by i2np.ntcp.maxConnections,
default is 500 (very high for now) default is 500 (very high for now)
* Persistent data store: Increase write limit from 300 to 600
so floodfill routers don't get backed up
2008-08-13 zzz 2008-08-13 zzz
* i2psnark: Fix OOM vulnerability by checking incoming message length * i2psnark: Fix OOM vulnerability by checking incoming message length

View File

@ -126,7 +126,7 @@ class PersistentDataStore extends TransientDataStore {
} }
/* /*
* Queue up writes, write up to 300 files every 10 minutes * Queue up writes, write up to 600 files every 10 minutes
*/ */
private class Writer implements Runnable { private class Writer implements Runnable {
private Map _keys; private Map _keys;
@ -171,7 +171,7 @@ class PersistentDataStore extends TransientDataStore {
write(key, data); write(key, data);
key = null; key = null;
data = null; data = null;
if (count >= 300) if (count >= 600)
count = 0; count = 0;
if (count == 0) if (count == 0)
try { Thread.sleep(10*60*1000); } catch (InterruptedException ie) {} try { Thread.sleep(10*60*1000); } catch (InterruptedException ie) {}