Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
- better logging - fixed bugs in auto-update
orbiter557f8d80e40a
diff --git a/source/de/anomic/plasma/plasmaParser.java b/source/de/anomic/plasma/plasmaParser.javaindex 68feb2397..5fe1ddfcd 100644--- a/source/de/anomic/plasma/plasmaParser.java+++ b/source/de/anomic/plasma/plasmaParser.java@@ -537,8 +537,10 @@ public final class plasmaParser {} catch (Exception e) { /* we can ignore this for the moment */serverLog.logWarning("PARSER", "Parser '" + className + "' doesn't work correctly and will be ignored.\n [" + e.getClass().getName() + "]: " + e.getMessage());+ e.printStackTrace();} catch (Error e) { /* we can ignore this for the moment */serverLog.logWarning("PARSER", "Parser '" + className + "' doesn't work correctly and will be ignored.\n [" + e.getClass().getName() + "]: " + e.getMessage());+ e.printStackTrace();}}}diff --git a/source/de/anomic/yacy/yacyDHTAction.java b/source/de/anomic/yacy/yacyDHTAction.javaindex 66a1e3ce8..4003c4631 100644--- a/source/de/anomic/yacy/yacyDHTAction.java+++ b/source/de/anomic/yacy/yacyDHTAction.java@@ -313,12 +313,14 @@ public class yacyDHTAction implements yacyPeerAction {if (seeds != null) {firstdist = yacyDHTAction.dhtDistance(seed.hash, firstKey);lastdist = yacyDHTAction.dhtDistance(seed.hash, lastKey);- if ((lastdist < maxDist) && (!(doublecheck.contains(seed.hash)))) {+ if (lastdist > maxDist) {+ if (log != null) log.logFine("Discarded too distant DHT target peer " + seed.getName() + ":" + seed.hash + ", distance2first = " + firstdist + ", distance2last = " + lastdist);+ } else if (doublecheck.contains(seed.hash)) {+ if (log != null) log.logFine("Discarded double DHT target peer " + seed.getName() + ":" + seed.hash + ", distance2first = " + firstdist + ", distance2last = " + lastdist);+ } else {if (log != null) log.logInfo("Selected " + ((seeds.size() < primaryPeerCount) ? "primary" : "reserve") + " DHT target peer " + seed.getName() + ":" + seed.hash + ", distance2first = " + firstdist + ", distance2last = " + lastdist);seeds.add(seed);doublecheck.add(seed.hash);- } else {- if (log != null) log.logInfo("Discarded improper DHT target peer " + seed.getName() + ":" + seed.hash + ", distance2first = " + firstdist + ", distance2last = " + lastdist);}}}diff --git a/source/de/anomic/yacy/yacyVersion.java b/source/de/anomic/yacy/yacyVersion.javaindex 5601ebc12..c1c33d665 100644--- a/source/de/anomic/yacy/yacyVersion.java+++ b/source/de/anomic/yacy/yacyVersion.java@@ -200,7 +200,7 @@ public final class yacyVersion implements Comparator, Comparable {// check if update process allowes update retrieveString process = sb.getConfig("update.process", "manual");if ((!manual) && (!process.equals("auto"))) {- yacyCore.log.logInfo("rulebasedUpdateInfo: not a automatic update selected");+ yacyCore.log.logInfo("rulebasedUpdateInfo: not an automatic update selected");return null; // no, its a manual or guided process}@@ -208,31 +208,31 @@ public final class yacyVersion implements Comparator, Comparable {long cycle = Math.max(1, sb.getConfigLong("update.cycle", 168)) * 24 * 60 * 60 * 1000;long timeLookup = sb.getConfigLong("update.time.lookup", System.currentTimeMillis());if ((!manual) && (timeLookup + cycle > System.currentTimeMillis())) {- yacyCore.log.logInfo("rulebasedUpdateInfo: too early for a lookup for a new release");+ yacyCore.log.logInfo("rulebasedUpdateInfo: too early for a lookup for a new release (timeLookup = " + timeLookup + ", cycle = " + cycle + ", now = " + System.currentTimeMillis() + ")");return null; // no we have recently made a lookup}// check if we know that there is a release that is more recent than that which we are usingTreeSet[] releasess = yacyVersion.allReleases(true); // {0=promain, 1=prodev, 2=stdmain, 3=stddev}boolean pro = new File(sb.getRootPath(), "libx").exists();- yacyVersion latestmain = (yacyVersion) releasess[(pro) ? 0 : 2].first();- yacyVersion latestdev = (yacyVersion) releasess[(pro) ? 1 : 3].first();+ yacyVersion latestmain = (yacyVersion) releasess[(pro) ? 0 : 2].last();+ yacyVersion latestdev = (yacyVersion) releasess[(pro) ? 1 : 3].last();String concept = sb.getConfig("update.concept", "any");String blacklist = sb.getConfig("update.blacklist", ".\\...[123]");if ((manual) || (concept.equals("any"))) {// return a dev-release or a main-releaseif ((latestdev.compareTo(latestmain) > 0) && (!(Float.toString(latestdev.releaseNr).matches(blacklist)))) {if (latestdev.compareTo(thisVersion()) > 0) return latestdev; else {- yacyCore.log.logInfo("rulebasedUpdateInfo: latest dev is not more recent than installed release");+ yacyCore.log.logInfo("rulebasedUpdateInfo: latest dev " + latestdev.name + " is not more recent than installed release " + thisVersion().name);return null;}} else {if ((Float.toString(latestmain.releaseNr).matches(blacklist))) {- yacyCore.log.logInfo("rulebasedUpdateInfo: latest dev matches with blacklist");+ yacyCore.log.logInfo("rulebasedUpdateInfo: latest dev " + latestdev.name + " matches with blacklist '" + blacklist + "'");return null;}if (latestmain.compareTo(thisVersion()) > 0) return latestmain; else {- yacyCore.log.logInfo("rulebasedUpdateInfo: latest main is not more recent than installed release (1)");+ yacyCore.log.logInfo("rulebasedUpdateInfo: latest main " + latestmain.name + " is not more recent than installed release (1) " + thisVersion().name);return null;}}@@ -240,11 +240,11 @@ public final class yacyVersion implements Comparator, Comparable {if (concept.equals("main")) {// return a main-releaseif ((Float.toString(latestmain.releaseNr).matches(blacklist))) {- yacyCore.log.logInfo("rulebasedUpdateInfo: latest main matches with blacklist");+ yacyCore.log.logInfo("rulebasedUpdateInfo: latest main " + latestmain.name + " matches with blacklist'" + blacklist + "'");return null;}if (latestmain.compareTo(thisVersion()) > 0) return latestmain; else {- yacyCore.log.logInfo("rulebasedUpdateInfo: latest main is not more recent than installed release (2)");+ yacyCore.log.logInfo("rulebasedUpdateInfo: latest main " + latestmain.name + " is not more recent than installed release (2) " + thisVersion().name);return null;}}