2005-10-26 jrandom
* In Syndie, propogate the subject and tags in a reply, and show the parent post on the edit page for easy quoting. (thanks identiguy and CofE!) * Streamline some netDb query handling to run outside the jobqueue - which means they'll run on the particular SSU thread that handles the message. This should help out heavily loaded netDb peers.
This commit is contained in:
@ -168,6 +168,10 @@ public class InNetMessagePool implements Service {
|
||||
if (job != null) {
|
||||
_context.jobQueue().addJob(job);
|
||||
jobFound = true;
|
||||
} else {
|
||||
// ok, we may not have *found* a job, per se, but we could have, the
|
||||
// job may have just executed inline
|
||||
jobFound = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
||||
*
|
||||
*/
|
||||
public class RouterVersion {
|
||||
public final static String ID = "$Revision: 1.276 $ $Date: 2005/10/22 13:06:03 $";
|
||||
public final static String ID = "$Revision: 1.277 $ $Date: 2005/10/25 14:13:53 $";
|
||||
public final static String VERSION = "0.6.1.3";
|
||||
public final static long BUILD = 7;
|
||||
public final static long BUILD = 8;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
||||
System.out.println("Router ID: " + RouterVersion.ID);
|
||||
|
@ -34,7 +34,7 @@ public class GarlicMessageBuilder {
|
||||
return buildMessage(ctx, config, new SessionKey(), new HashSet());
|
||||
}
|
||||
public static GarlicMessage buildMessage(RouterContext ctx, GarlicConfig config, SessionKey wrappedKey, Set wrappedTags) {
|
||||
return buildMessage(ctx, config, wrappedKey, wrappedTags, 20);
|
||||
return buildMessage(ctx, config, wrappedKey, wrappedTags, 50);
|
||||
}
|
||||
public static GarlicMessage buildMessage(RouterContext ctx, GarlicConfig config, SessionKey wrappedKey, Set wrappedTags, int numTagsToDeliver) {
|
||||
Log log = ctx.logManager().getLog(GarlicMessageBuilder.class);
|
||||
@ -68,7 +68,7 @@ public class GarlicMessageBuilder {
|
||||
wrappedTags.add(new SessionTag(true));
|
||||
if (log.shouldLog(Log.INFO))
|
||||
log.info("Less than 10 tags are available (" + availTags + "), so we're including more");
|
||||
} else if (ctx.sessionKeyManager().getAvailableTimeLeft(key, curKey) < 30*1000) {
|
||||
} else if (ctx.sessionKeyManager().getAvailableTimeLeft(key, curKey) < 60*1000) {
|
||||
// if we have > 10 tags, but they expire in under 30 seconds, we want more
|
||||
for (int i = 0; i < numTagsToDeliver; i++)
|
||||
wrappedTags.add(new SessionTag(true));
|
||||
|
@ -35,7 +35,14 @@ public class FloodfillDatabaseLookupMessageHandler implements HandlerJobBuilder
|
||||
_context.statManager().addRateData("netDb.lookupsReceived", 1, 0);
|
||||
|
||||
if (true || _context.throttle().acceptNetDbLookupRequest(((DatabaseLookupMessage)receivedMessage).getSearchKey())) {
|
||||
return new HandleFloodfillDatabaseLookupMessageJob(_context, (DatabaseLookupMessage)receivedMessage, from, fromHash);
|
||||
Job j = new HandleFloodfillDatabaseLookupMessageJob(_context, (DatabaseLookupMessage)receivedMessage, from, fromHash);
|
||||
if (true) {
|
||||
// might as well inline it, all the heavy lifting is queued up in later jobs, if necessary
|
||||
j.runJob();
|
||||
return null;
|
||||
} else {
|
||||
return j;
|
||||
}
|
||||
} else {
|
||||
if (_log.shouldLog(Log.INFO))
|
||||
_log.info("Dropping lookup request as throttled");
|
||||
|
@ -29,6 +29,12 @@ public class FloodfillDatabaseStoreMessageHandler implements HandlerJobBuilder {
|
||||
_facade = facade;
|
||||
}
|
||||
public Job createJob(I2NPMessage receivedMessage, RouterIdentity from, Hash fromHash) {
|
||||
return new HandleFloodfillDatabaseStoreMessageJob(_context, (DatabaseStoreMessage)receivedMessage, from, fromHash, _facade);
|
||||
Job j = new HandleFloodfillDatabaseStoreMessageJob(_context, (DatabaseStoreMessage)receivedMessage, from, fromHash, _facade);
|
||||
if (true) {
|
||||
j.runJob();
|
||||
return null;
|
||||
} else {
|
||||
return j;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user