From 630ddb4deb06f4f3e696e2d91247c1eb00bebc27 Mon Sep 17 00:00:00 2001 From: gojomo Date: Wed, 20 Apr 2011 02:38:26 +0000 Subject: [PATCH] [HER-1883] seeds result info (for seeds report, crawl report tally) lost after checkpoint & resume * SeedRecord.java ensure makeDirty() is called after every updateWith() (but not the initial instantiation) --- .../archive/crawler/reporting/SeedRecord.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/engine/src/main/java/org/archive/crawler/reporting/SeedRecord.java b/engine/src/main/java/org/archive/crawler/reporting/SeedRecord.java index 6a837f12..edc8a15d 100644 --- a/engine/src/main/java/org/archive/crawler/reporting/SeedRecord.java +++ b/engine/src/main/java/org/archive/crawler/reporting/SeedRecord.java @@ -52,7 +52,7 @@ public class SeedRecord implements CoreAttributeConstants, Serializable, Identit public SeedRecord(CrawlURI curi, String disposition) { super(); this.uri = curi.getURI(); - updateWith(curi,disposition); + fillWith(curi,disposition); } /** @@ -86,11 +86,24 @@ public class SeedRecord implements CoreAttributeConstants, Serializable, Identit /** * A later/repeat report of the same seed has arrived; update with - * latest. Should be rare/never? + * latest. * * @param curi + * @param disposition */ public void updateWith(CrawlURI curi,String disposition) { + fillWith(curi, disposition); + this.makeDirty(); + } + + /** + * Fill instance with given values; skips makeDirty so may be used + * on initialization. + * + * @param curi + * @param disposition + */ + protected void fillWith(CrawlURI curi, String disposition) { if(!this.uri.equals(curi.getURI())) { logger.warning("SeedRecord URI changed: "+uri+"->"+curi.getURI()); }