Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
*) fixed News deletion. News are now removed if they are no longer in a news-stack. This does not effect News-entires in the news-db that have no stack-entries.
hydrox91841132848e
diff --git a/htroot/News.java b/htroot/News.javaindex 96dafaf79..ba522e749 100644--- a/htroot/News.java+++ b/htroot/News.java@@ -92,14 +92,14 @@ public class News {}yacyNewsRecord record;try {- if ((tableID == yacyNewsPool.PROCESSED_DB) || (tableID == yacyNewsPool.PUBLISHED_DB)) {- yacyCore.newsPool.clear(tableID);- } else {+// if ((tableID == yacyNewsPool.PROCESSED_DB) || (tableID == yacyNewsPool.PUBLISHED_DB)) {+// yacyCore.newsPool.clear(tableID);+// } else {while (yacyCore.newsPool.size(tableID) > 0) {record = yacyCore.newsPool.get(tableID, 0);yacyCore.newsPool.moveOff(tableID, record.id());}- }+// }} catch (IOException e) {e.printStackTrace();}diff --git a/source/de/anomic/yacy/yacyNewsPool.java b/source/de/anomic/yacy/yacyNewsPool.javaindex c8e88376f..22cf08f62 100644--- a/source/de/anomic/yacy/yacyNewsPool.java+++ b/source/de/anomic/yacy/yacyNewsPool.java@@ -304,8 +304,19 @@ public class yacyNewsPool {private boolean moveOff(yacyNewsQueue fromqueue, yacyNewsQueue toqueue, String id) throws IOException {// called if a published news shall be removedyacyNewsRecord record = fromqueue.remove(id);- if (record == null) return false;+ if (record == null) {+ System.out.println("DEBUG: record == null");+ return false;+ }if (toqueue != null) toqueue.push(record);+ else if ((incomingNews.get(id) == null) && (processedNews.get(id) == null) && (outgoingNews.get(id) == null) && (publishedNews.get(id) == null)){+ newsDB.remove(id);+ System.out.println("DEBUG: News-ID " + id + " deleted");+ }+ if (incomingNews.get(id) != null) System.out.println("DEBUG: News-ID " + id + " in incomingNews");+ if (processedNews.get(id) != null) System.out.println("DEBUG: News-ID " + id + " in processedNews");+ if (outgoingNews.get(id) != null) System.out.println("DEBUG: News-ID " + id + " in outgoingNews");+ if (publishedNews.get(id) != null) System.out.println("DEBUG: News-ID " + id + " in publishedNews");return true;}