Author: toad
Date: 2009-01-29 20:46:09 +0000 (Thu, 29 Jan 2009)
New Revision: 25381

Modified:
   branches/db4o/freenet/src/freenet/support/io/SegmentedBucketChainBucket.java
Log:
We need to know that it's *stored and* not active


Modified: 
branches/db4o/freenet/src/freenet/support/io/SegmentedBucketChainBucket.java
===================================================================
--- 
branches/db4o/freenet/src/freenet/support/io/SegmentedBucketChainBucket.java    
    2009-01-29 20:35:30 UTC (rev 25380)
+++ 
branches/db4o/freenet/src/freenet/support/io/SegmentedBucketChainBucket.java    
    2009-01-29 20:46:09 UTC (rev 25381)
@@ -280,12 +280,13 @@
                                dbJobRunner.runBlocking(new DBJob() {
                                        
                                        public void run(ObjectContainer 
container, ClientContext context) {
-                                               
if(!container.ext().isActive(oldSeg)) {
-                                                       Logger.error(this, "OLD 
SEGMENT NOT ACTIVE: "+oldSeg, new Exception("error"));
-                                                       
container.activate(oldSeg, 1);
-                                               } else {
-                                                       
oldSeg.storeTo(container);
+                                               
if(container.ext().isStored(oldSeg)) {
+                                                       
if(!container.ext().isActive(oldSeg)) {
+                                                               
Logger.error(this, "OLD SEGMENT STORED BUT NOT ACTIVE: "+oldSeg, new 
Exception("error"));
+                                                               
container.activate(oldSeg, 1);
+                                                       }
                                                }
+                                               oldSeg.storeTo(container);
                                                container.ext().store(segments, 
1);
                                                
container.ext().store(SegmentedBucketChainBucket.this, 1);
                                                container.deactivate(oldSeg, 1);

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to