From 2d472a39f463db4a07b6e64af8577034b9122edc Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Mon, 4 Mar 2013 00:07:52 +0100 Subject: [PATCH] DHT-transferred metadata and crawl receipts now also use the delayed search cache to prevent that too much IO load is on the peer during search. --- htroot/yacy/crawlReceipt.java | 2 +- htroot/yacy/transferURL.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htroot/yacy/crawlReceipt.java b/htroot/yacy/crawlReceipt.java index fdf952781..d8980b323 100644 --- a/htroot/yacy/crawlReceipt.java +++ b/htroot/yacy/crawlReceipt.java @@ -146,7 +146,7 @@ public final class crawlReceipt { if ("fill".equals(result)) try { // put new entry into database - sb.index.fulltext().putMetadata(entry); + sb.index.fulltext().putMetadataLater(entry); ResultURLs.stack(ASCII.String(entry.url().hash()), entry.url().getHost(), youare.getBytes(), iam.getBytes(), EventOrigin.REMOTE_RECEIPTS); sb.crawlQueues.delegatedURL.remove(entry.hash()); // the delegated work has been done if (log.isInfo()) log.logInfo("crawlReceipt: RECEIVED RECEIPT from " + otherPeerName + " for URL " + ASCII.String(entry.hash()) + ":" + entry.url().toNormalform(false)); diff --git a/htroot/yacy/transferURL.java b/htroot/yacy/transferURL.java index bcaf3da08..556ec0a22 100644 --- a/htroot/yacy/transferURL.java +++ b/htroot/yacy/transferURL.java @@ -149,7 +149,7 @@ public final class transferURL { // write entry to database if (Network.log.isFine()) Network.log.logFine("Accepting URL " + i + "/" + urlc + " from peer " + otherPeerName + ": " + lEntry.url().toNormalform(true)); try { - sb.index.fulltext().putMetadata(lEntry); + sb.index.fulltext().putMetadataLater(lEntry); ResultURLs.stack(ASCII.String(lEntry.url().hash()), lEntry.url().getHost(), iam.getBytes(), iam.getBytes(), EventOrigin.DHT_TRANSFER); if (Network.log.isFine()) Network.log.logFine("transferURL: received URL '" + lEntry.url().toNormalform(false) + "' from peer " + otherPeerName); received++;