*) Bugfix for ConcurrentModification in kelondroAbstractRA.writeMap caused by yacySeed.getMap()

See: http://www.yacy-forum.de/viewtopic.php?p=9523

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@695 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 20 years ago
parent d3c923e6b9
commit 177e8af5b7

@ -337,7 +337,7 @@ public class yacyCore {
log.logInfo("publish: handshaked " + this.seed.get("PeerType", "senior") + " peer '" + this.seed.getName() + "' at " + this.seed.getAddress()); log.logInfo("publish: handshaked " + this.seed.get("PeerType", "senior") + " peer '" + this.seed.getName() + "' at " + this.seed.getAddress());
} }
} catch (Exception e) { } catch (Exception e) {
log.logSevere("publishThread: error with target seed " + seed.getMap() + ": " + e.getMessage(), e); log.logSevere("publishThread: error with target seed " + seed.toString() + ": " + e.getMessage(), e);
this.error = e; this.error = e;
} finally { } finally {
this.syncList.add(this); this.syncList.add(this);

@ -140,7 +140,7 @@ public class yacySearch extends Thread {
seed = (yacySeed) dhtEnum.nextElement(); seed = (yacySeed) dhtEnum.nextElement();
if (seed == null) continue; if (seed == null) continue;
score = (int) Math.round(Math.random() * ((c / 3) + 3)); score = (int) Math.round(Math.random() * ((c / 3) + 3));
serverLog.logFine("PLASMA", "selectPeers/RWIcount: " + seed.hash + ":" + seed.getName() + ", RWIcount=" + seed.getMap().get("ICount") + ", score " + score); serverLog.logFine("PLASMA", "selectPeers/RWIcount: " + seed.hash + ":" + seed.getName() + ", RWIcount=" + seed.get("ICount","") + ", score " + score);
ranking.addScore(seed.hash, score); ranking.addScore(seed.hash, score);
seeds.put(seed.hash, seed); seeds.put(seed.hash, seed);
c--; c--;

@ -156,7 +156,7 @@ public class yacySeed {
} }
public Map getMap() { public Map getMap() {
return dna; return (Hashtable) dna.clone();
} }
public String getName() { public String getName() {

@ -64,7 +64,7 @@ import de.anomic.server.serverSwitch;
import de.anomic.server.logging.serverLog; import de.anomic.server.logging.serverLog;
import de.anomic.tools.disorderHeap; import de.anomic.tools.disorderHeap;
public class yacySeedDB { public final class yacySeedDB {
// global statics // global statics
public static final int commonHashLength = 12; public static final int commonHashLength = 12;
@ -84,10 +84,10 @@ public class yacySeedDB {
private kelondroMap seedActiveDB, seedPassiveDB, seedPotentialDB; private kelondroMap seedActiveDB, seedPassiveDB, seedPotentialDB;
private int seedDBBufferKB; private int seedDBBufferKB;
public plasmaSwitchboard sb; public final plasmaSwitchboard sb;
public yacySeed mySeed; // my own seed public yacySeed mySeed; // my own seed
public File myOwnSeedFile; public final File myOwnSeedFile;
private Hashtable nameLookupCache; private final Hashtable nameLookupCache;
public yacySeedDB(plasmaSwitchboard sb, public yacySeedDB(plasmaSwitchboard sb,

Loading…
Cancel
Save