[freenet-cvs] r18960 - trunk/freenet/src/freenet/node
toad at freenetproject.org
toad at freenetproject.org
Thu Apr 3 15:36:39 UTC 2008
Author: toad
Date: 2008-04-03 15:36:38 +0000 (Thu, 03 Apr 2008)
New Revision: 18960
Modified:
trunk/freenet/src/freenet/node/Version.java
Log:
1132:
Client layer:
- Fix a critical bug in the cooldown queue: We must store both the key and the client, otherwise when we remove the key for one client we may also remove it for another client which had the same cooldown deadline. This actually happens for splitfiles, so once we'd tried a block 3 times we would never try it again.
- Another major fix: we weren't calling setParentGrabArray(null) in the few-requests path in RGA.removeRandom(). This was causing us to not reregister, and therefore lose blocks.
- Refactor slightly in FetcherSegment.onSuccess(): allocate the new subsegment earlier on, use it for the cooldown queue.
- Code simplifications/minor refactoring.
- More consistent fetched blocks count (never report a block success after we've started decoding).
- Prevent a temporary space leak.
- Prevent healing inserts for successfully fetched blocks.
- Fix losing blocks when changing priority for a request some of whose blocks are on the cooldown queue. We didn't reset the deadlines, so after a failure that block wouldn't be rescheduled, frequently causing the loss of the subsegment...
- Cooldown queue: don't continue forward when searching for a key to start, continue only to end.
- Cooldown queue: enforce MIN_SIZE when expanding the queue.
- Split RGAItem.isCancelled() into RGAItem.isEmpty() (should it be removed, no blocks??), and SendableGet.isCancelled() (is it actually cancelled/finished i.e. should we complain if we try to send a request on it?).
- Synchronization changes to avoid deadlock given that SubSegment locks on Segment: SendableGet doesn't need to synchronize when checking for cancellation. Explain locking in SendableRequest: sync(this) must always be last since subclasses may do wierd things.
- Synchronization: hold the clientGrabber lock while doing the rest of the registration. We do this when fetching so it is safe. It prevents a race condition resulting in blocks being removed right after they are added.
- Synchronization: CRS: hold (this) while accessing allRequestsByClientRequest in removeRandom().
- Possibly fix a 2G limit caused by multiplying in the wrong order in SplitFileFetcher.
IP detection:
- Set lastAddressList to null when we have no addresses so we redetect next time.
- Pick up a changed IP address more quickly.
Bookmarks:
- Update FMS and french index edition.
L10n:
- German update.
HTML filter:
- Don't return null from toString() when deleting a tag. We don't check for it, so it might cause NPEs.
Config:
- Keep persistent temp dir however the user specified it (e.g. as a relative path).
Misc:
- Some minor synchronization fixes (make stuff volatile).
- Fields.binarySearch() (only used by cooldown queue atm, so this is unlikely to matter as it never gets that big): better way to find the middle, avoids integer overflow, accurate searches up to integer.max_value size rather than half that.
- Possibly fix a 2G limit caused by multiplying in the wrong order in BaseFileBucket.split().
Dev stuff:
- Logging.
- Indenting.
- Comments.
- Prevent NetworkIDManager.equals() ClassCastException.
- Delete some dead code.
- Make some inner classes static final.
Installer:
- Re-add the preferences panel to the firefox profile.
- Update.sh:
-- Fix a bashism.
-- Download the jars to a temporary directory. If they are different to the current jars, shutdown the node, replace the jar(s), and restart. This is necessary because replacing the jars before restarting might break the restart process, as recently reported on #freenet.
-- The comparison code wasn't always working, fixed some bugs e.g. in the md5 path.
Website:
- German translation of the download page.
Plugins:
- Minor (should not cause deadlocks) synchronization fixes.
dbkr
NEOatNHNG
nextgens
toad
Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2008-04-03 15:07:07 UTC (rev 18959)
+++ trunk/freenet/src/freenet/node/Version.java 2008-04-03 15:36:38 UTC (rev 18960)
@@ -24,17 +24,17 @@
public static final String protocolVersion = "1.0";
/** The build number of the current revision */
- private static final int buildNumber = 1131;
+ private static final int buildNumber = 1132;
/** Oldest build of Fred we will talk to */
- private static final int oldLastGoodBuild = 1130;
- private static final int newLastGoodBuild = 1131;
+ private static final int oldLastGoodBuild = 1131;
+ private static final int newLastGoodBuild = 1132;
static final long transitionTime;
static {
final Calendar _cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
// year, month - 1 (or constant), day, hour, minute, second
- _cal.set( 2008, Calendar.APRIL, 3, 0, 0, 0 );
+ _cal.set( 2008, Calendar.APRIL, 5, 0, 0, 0 );
transitionTime = _cal.getTimeInMillis();
}
More information about the cvs
mailing list