This is an automated email from the ASF dual-hosted git repository.

snagel pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nutch.git


The following commit(s) were added to refs/heads/master by this push:
     new 5b970ff22 NUTCH-2951 Crawl datum with metadata 
WRITABLE_GENERATE_TIME_KEY awaits fetching forever - bug fix: add missing 
braces   (bug introduced with NUTCH-2737, solution contributed by Lapadula 
Alessandro)
5b970ff22 is described below

commit 5b970ff22a4c8a644cde2e62d1117f18dc11eef4
Author: Sebastian Nagel <sna...@apache.org>
AuthorDate: Sun Jun 5 12:45:00 2022 +0200

    NUTCH-2951 Crawl datum with metadata WRITABLE_GENERATE_TIME_KEY awaits 
fetching forever
    - bug fix: add missing braces
      (bug introduced with NUTCH-2737, solution contributed by Lapadula 
Alessandro)
---
 src/java/org/apache/nutch/crawl/Generator.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/java/org/apache/nutch/crawl/Generator.java 
b/src/java/org/apache/nutch/crawl/Generator.java
index 15fedbf54..0fce6b3b0 100644
--- a/src/java/org/apache/nutch/crawl/Generator.java
+++ b/src/java/org/apache/nutch/crawl/Generator.java
@@ -238,10 +238,11 @@ public class Generator extends NutchTool implements Tool {
       LongWritable oldGenTime = (LongWritable) crawlDatum.getMetaData()
           .get(Nutch.WRITABLE_GENERATE_TIME_KEY);
       if (oldGenTime != null) { // awaiting fetch & update
-        if (oldGenTime.get() + genDelay > curTime) // still wait for
+        if (oldGenTime.get() + genDelay > curTime) { // still wait for
           // update
           context.getCounter("Generator", "WAIT_FOR_UPDATE").increment(1);
-        return;
+          return;
+        }
       }
       float sort = 1.0f;
       try {

Reply via email to