Changeset 97aeecd8


Ignore:
Timestamp:
Jun 8, 2015 7:24:28 PM (6 years ago)
Author:
dg2-new <dg2-new@…>
Branches:
master
Children:
ff2ea9a
Parents:
8098d70
Message:

FloodfillMonitorJob?, FloodfillRouterInfoFloodJob?:

  • Directly connect to nearby floodfills to share our RI to speed up integration of new floodfills (#1195).
  • Called on both non-ff → ff OR ff → non-ff.
  • Create FloodfillRouterInfoFloodJob? to do so.
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • history.txt

    r8098d70 r97aeecd8  
    22 * Language fixes
    33 * Make netDb.storeFloodNew graphable for testing (#1195)
     4 * Directly connect to nearby floodfills to share our RI
     5   to speed up integration of new floodfills (#1195)
    46
    572015-06-06 str4d
  • router/java/src/net/i2p/router/RouterVersion.java

    r8098d70 r97aeecd8  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 2;
     21    public final static long BUILD = 3;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/networkdb/kademlia/FloodfillMonitorJob.java

    r8098d70 r97aeecd8  
    77import net.i2p.data.router.RouterAddress;
    88import net.i2p.data.router.RouterInfo;
     9import net.i2p.router.Job;
    910import net.i2p.router.JobImpl;
    1011import net.i2p.router.Router;
     
    5657                getContext().router().eventLog().addEvent(EventLog.NOT_FLOODFILL);
    5758            }
    58             getContext().router().rebuildRouterInfo();
     59            getContext().router().rebuildRouterInfo(true);
     60            Job routerInfoFlood = new FloodfillRouterInfoFloodJob(getContext(), _facade);
     61            if(getContext().router().getUptime() < 5*60*1000) {
     62                // Needed to prevent race if router.floodfillParticipant=true (not auto)
     63                routerInfoFlood.getTiming().setStartAfter(getContext().clock().now() + 5*60*1000);
     64                getContext().jobQueue().addJob(routerInfoFlood);
     65                if(_log.shouldLog(Log.DEBUG)) {
     66                    _log.logAlways(Log.DEBUG, "Deferring our FloodfillRouterInfoFloodJob run because of low uptime.");
     67                }
     68            } else {
     69                routerInfoFlood.runJob();
     70                if(_log.shouldLog(Log.DEBUG)) {
     71                    _log.logAlways(Log.DEBUG, "Running FloodfillRouterInfoFloodJob");
     72                }
     73            }
    5974        }
    6075        if (_log.shouldLog(Log.INFO))
     
    6277        int delay = (REQUEUE_DELAY / 2) + getContext().random().nextInt(REQUEUE_DELAY);
    6378        // there's a lot of eligible non-floodfills, keep them from all jumping in at once
    64         // To do: somehow assess the size of the network to make this adaptive?
     79        // TODO: somehow assess the size of the network to make this adaptive?
    6580        if (!ff)
    6681            delay *= 4; // this was 7, reduced for moar FFs --zab
  • router/java/src/net/i2p/router/networkdb/kademlia/FloodfillNetworkDatabaseFacade.java

    r8098d70 r97aeecd8  
    4141     *  4 as of 0.9.2; 3 as of 0.9.9
    4242     */
    43     private static final int MAX_TO_FLOOD = 3;
     43    public static final int MAX_TO_FLOOD = 3;
    4444   
    4545    private static final int FLOOD_PRIORITY = OutNetMessage.PRIORITY_NETDB_FLOOD;
Note: See TracChangeset for help on using the changeset viewer.