From a049761e0c29ae18cde49b0ee0bf4451b82a5043 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Mon, 20 Aug 2012 14:16:37 +0200 Subject: [PATCH] fixed double-check --- source/net/yacy/search/query/RWIProcess.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/net/yacy/search/query/RWIProcess.java b/source/net/yacy/search/query/RWIProcess.java index 5514fa3fd4..50d622809c 100644 --- a/source/net/yacy/search/query/RWIProcess.java +++ b/source/net/yacy/search/query/RWIProcess.java @@ -338,6 +338,11 @@ public void add( assert (iEntry.urlhash().length == index.row().primaryKeyLength); //if (iEntry.urlHash().length() != index.row().primaryKeyLength) continue; + // doublecheck for urls + if (this.urlhashes.has(iEntry.urlhash())) { + continue pollloop; + } + // increase flag counts for ( int j = 0; j < 32; j++ ) { if ( iEntry.flags().get(j) ) { @@ -432,9 +437,7 @@ public void add( } } - // finally make a double-check and insert result to stack - // the url hashes should be unique, no reason to check that - //if (!this.urlhashes.has(iEntry.urlhash())) { + // finally extend the double-check and insert result to stack this.urlhashes.putUnique(iEntry.urlhash()); rankingtryloop: while ( true ) { try {