mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-09-24 22:55:45 +00:00
[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)
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user