Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the new load management option to ignored. #858

Merged
merged 1 commit into from
Sep 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 4 additions & 40 deletions src/freenet/node/NodeStats.java
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ public void shouldUpdate(){
public final DecayingKeyspaceAverage avgClientCacheSSKSuccess;
public final DecayingKeyspaceAverage avgStoreSSKSuccess;

private volatile boolean enableNewLoadManagementRT;
private volatile boolean enableNewLoadManagementBulk;
private final boolean enableNewLoadManagementRT = false;
private final boolean enableNewLoadManagementBulk = false;
ArneBab marked this conversation as resolved.
Show resolved Hide resolved

NodeStats(Node node, int sortOrder, SubConfig statsConfig, int obwLimit, int ibwLimit, int lastVersion) throws NodeInitException {
this.node = node;
Expand Down Expand Up @@ -509,44 +509,8 @@ public void onChange(NETWORK_THREAT_LEVEL oldLevel, NETWORK_THREAT_LEVEL newLeve

});

statsConfig.register("enableNewLoadManagementRT", false, sortOrder++, true, false, "Node.enableNewLoadManagementRT", "Node.enableNewLoadManagementRTLong", new BooleanCallback() {

@Override
public Boolean get() {
return enableNewLoadManagementRT;
}

@Override
public void set(Boolean val) throws InvalidConfigValueException,
NodeNeedRestartException {
enableNewLoadManagementRT = val;
}

});
enableNewLoadManagementRT = statsConfig.getBoolean("enableNewLoadManagementRT");
statsConfig.register("enableNewLoadManagementBulk", false, sortOrder++, true, false, "Node.enableNewLoadManagementBulk", "Node.enableNewLoadManagementBulkLong", new BooleanCallback() {

@Override
public Boolean get() {
return enableNewLoadManagementBulk;
}

@Override
public void set(Boolean val) throws InvalidConfigValueException,
NodeNeedRestartException {
enableNewLoadManagementBulk = val;
}

});
enableNewLoadManagementBulk = statsConfig.getBoolean("enableNewLoadManagementBulk");

if(node.lastVersion <= 1455 && (enableNewLoadManagementRT || enableNewLoadManagementBulk)) {
// FIXME remove
enableNewLoadManagementRT = false;
enableNewLoadManagementBulk = false;
System.err.println("Turning off NLM when upgrading from pre-1455. The load stats messages aren't being sent at the moment so it won't work anyway.");
statsConfig.config.store();
}
statsConfig.registerIgnoredOption("enableNewLoadManagementRT");
statsConfig.registerIgnoredOption("enableNewLoadManagementBulk");

persister = new ConfigurablePersister(this, statsConfig, "nodeThrottleFile", "node-throttle.dat", sortOrder++, true, false,
"NodeStat.statsPersister", "NodeStat.statsPersisterLong", node.ticker, node.getRunDir());
Expand Down
Loading