orbiter 16 years ago
parent f133d6065c
commit bffbe43e09

@ -95,7 +95,7 @@ public class IndexCleaner_p {
prop.put("rwidb_threadToString", indexCleanerThread.toString());
prop.putNum("rwidb_RWIcountstart", indexCleanerThread.rwiCountAtStart);
prop.putNum("rwidb_RWIcountnow", sb.webIndex.index().size());
prop.put("rwidb_wordHashNow", indexCleanerThread.wordHashNow);
prop.put("rwidb_wordHashNow", (indexCleanerThread.wordHashNow == null) ? "NULL" : new String(indexCleanerThread.wordHashNow));
prop.put("rwidb_lastWordHash", (indexCleanerThread.lastWordHash == null) ? "null" : new String(indexCleanerThread.lastWordHash));
prop.putNum("rwidb_lastDeletionCounter", indexCleanerThread.lastDeletionCounter);

@ -2009,9 +2009,19 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
} else if (MemoryControl.available() < 1024*1024*25) {
log.logInfo("dhtTransferJob: no selection, too less memory available : " + (MemoryControl.available() / 1024 / 1024) + " MB");
} else {
byte[] startHash = PeerSelection.selectTransferStart();
byte[] startHash = null, limitHash = null;
int tries = 10;
while (tries-- > 0) {
startHash = PeerSelection.selectTransferStart();
assert startHash != null;
limitHash = PeerSelection.limitOver(this.webIndex.peers(), startHash);
if (limitHash != null) break;
}
if (limitHash == null || startHash == null) {
log.logInfo("dhtTransferJob: approaching full DHT dispersion.");
return false;
}
log.logInfo("dhtTransferJob: selected " + new String(startHash) + " as start hash");
byte[] limitHash = PeerSelection.limitOver(this.webIndex.peers(), startHash);
log.logInfo("dhtTransferJob: selected " + new String(limitHash) + " as limit hash");
try {
boolean enqueued = this.dhtDispatcher.selectContainersEnqueueToCloud(

Loading…
Cancel
Save