Author: toad
Date: 2009-02-17 17:05:54 +0000 (Tue, 17 Feb 2009)
New Revision: 25670
Modified:
branches/db4o/freenet/src/freenet/support/io/SegmentedBucketChainBucket.java
Log:
Fix not adding a killMe if there is only one segment -> temp space leak
Modified:
branches/db4o/freenet/src/freenet/support/io/SegmentedBucketChainBucket.java
===================================================================
---
branches/db4o/freenet/src/freenet/support/io/SegmentedBucketChainBucket.java
2009-02-17 17:05:33 UTC (rev 25669)
+++
branches/db4o/freenet/src/freenet/support/io/SegmentedBucketChainBucket.java
2009-02-17 17:05:54 UTC (rev 25670)
@@ -281,6 +281,8 @@
@Override
public void close() throws IOException {
if(closed) return;
+ if(Logger.shouldLog(Logger.MINOR, this))
+ Logger.minor(this, "Closing "+this+"
for "+SegmentedBucketChainBucket.this);
cur.close();
closed = true;
cur = null;
@@ -299,6 +301,13 @@
container.ext().store(segments,
1);
container.ext().store(SegmentedBucketChainBucket.this, 1);
container.deactivate(oldSeg, 1);
+ // If there is only one
segment, we didn't add a killMe.
+ // Add one now.
+
synchronized(SegmentedBucketChainBucket.this) {
+ if(killMe != null)
return;
+ killMe = new
SegmentedBucketChainBucketKillJob(SegmentedBucketChainBucket.this);
+ }
+
killMe.scheduleRestart(container, context);
}
}, NativeThread.HIGH_PRIORITY);
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs