do not write an empty failreason in case that there is no fail. Because

of the lazy instantiation rule this value was not actually written, but
if lazy instantiation is switched on, then this causes that all crawl
starts delete all crawl-start-hosts completely because this looks for
filled error reasons.
pull/1/head
orbiter 12 years ago
parent 61e015268b
commit 080d80c9de

@ -201,7 +201,6 @@ public class CollectionConfiguration extends SchemaConfiguration implements Seri
final DigestURI digestURI = md.url(); final DigestURI digestURI = md.url();
boolean allAttr = this.isEmpty(); boolean allAttr = this.isEmpty();
if (allAttr || contains(CollectionSchema.failreason_s)) add(doc, CollectionSchema.failreason_s, "");
add(doc, CollectionSchema.id, ASCII.String(md.hash())); add(doc, CollectionSchema.id, ASCII.String(md.hash()));
String us = digestURI.toNormalform(true); String us = digestURI.toNormalform(true);
add(doc, CollectionSchema.sku, us); add(doc, CollectionSchema.sku, us);
@ -354,7 +353,6 @@ public class CollectionConfiguration extends SchemaConfiguration implements Seri
Set<ProcessType> processTypes = new LinkedHashSet<ProcessType>(); Set<ProcessType> processTypes = new LinkedHashSet<ProcessType>();
add(doc, CollectionSchema.id, id); add(doc, CollectionSchema.id, id);
if (allAttr || contains(CollectionSchema.failreason_s)) add(doc, CollectionSchema.failreason_s, ""); // overwrite a possible fail reason (in case that there was a fail reason before)
String docurl = digestURI.toNormalform(true); String docurl = digestURI.toNormalform(true);
add(doc, CollectionSchema.sku, docurl); add(doc, CollectionSchema.sku, docurl);

Loading…
Cancel
Save