some bugfixes:

- dht iterator start point
- wordIndex synchronization
- surftipps url check

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3633 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 18 years ago
parent 06b6e35484
commit b9add5cf37

@ -226,6 +226,7 @@ public class Surftips {
if (record.category().equals(yacyNewsPool.CATEGORY_PROFILE_UPDATE)) {
url = record.attribute("homepage", "");
if ((url == null) || (url.length() < 12)) continue;
entry = rowdef.newEntry(new byte[][]{
url.getBytes(),
("Home Page of " + record.attribute("nickname", "")).getBytes("UTF-8"),

@ -153,7 +153,7 @@ public class plasmaDHTFlush extends Thread {
public void performTransferWholeIndex() {
plasmaDHTChunk newDHTChunk = null, oldDHTChunk = null;
try {
// initial startingpoint of intex transfer is "------------"
// initial startingpoint of intex transfer is "AAAAAAAAAAAA"
this.log.logFine("Selected hash " + this.startPointHash + " as start point for index distribution of whole index");
/* Loop until we have
@ -178,7 +178,7 @@ public class plasmaDHTFlush extends Thread {
if (nothingSelected(newDHTChunk)) {
if (this.sb.wordIndex.size() > 0 && this.delete) {
// if there are still words in the index we try it again now
this.startPointHash = "------------";
this.startPointHash = "AAAAAAAAAAAA";
} else {
// otherwise we could end transfer now
this.log.logFine("No index available for index transfer, hash start-point " + this.startPointHash);

@ -199,12 +199,8 @@ public final class plasmaWordIndex implements indexRI {
}
public void flushCacheSome() {
synchronized (dhtOutCache) {
flushCache(dhtOutCache, (dhtOutCache.size() > 3 * flushsize) ? flushsize : Math.min(flushsize, Math.max(1, dhtOutCache.size() / lowcachedivisor)));
}
synchronized (dhtInCache) {
flushCache(dhtInCache, (dhtInCache.size() > 3 * flushsize) ? flushsize : Math.min(flushsize, Math.max(1, dhtInCache.size() / lowcachedivisor)));
}
flushCache(dhtOutCache, (dhtOutCache.size() > 3 * flushsize) ? flushsize : Math.min(flushsize, Math.max(1, dhtOutCache.size() / lowcachedivisor)));
flushCache(dhtInCache, (dhtInCache.size() > 3 * flushsize) ? flushsize : Math.min(flushsize, Math.max(1, dhtInCache.size() / lowcachedivisor)));
}
private void flushCache(indexRAMRI ram, int count) {
@ -214,7 +210,7 @@ public final class plasmaWordIndex implements indexRI {
busyCacheFlush = true;
String wordHash;
ArrayList containerList = new ArrayList();
synchronized (this) {
synchronized (ram) {
boolean collectMax = true;
indexContainer c;
while (collectMax) {

Loading…
Cancel
Save