lfoppiano opened a new issue, #2021:
URL: https://github.com/apache/stormcrawler/issues/2021

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   HI all, I'm not sure whether this is a bug, it seems that the 
`URLFilterBolt.execute()` emits unanchored tuples:  it uses the two-argument 
`collector.emit(String streamId, List<Object> tuple)`, which does not anchor 
the outgoing tuple to the incoming one. This happens at both of its emit sites:
   
   `core/src/main/java/org/apache/stormcrawler/bolt/URLFilterBolt.java:80-85` 
(the `discoveredOnly`
   short-circuit):
   
   ```java
   if (discoveredOnly && !status.equals(Status.DISCOVERED)) {
       Values v = new Values(urlString, metadata, status);
       collector.emit(stream, v);          // <-- unanchored
       collector.ack(input);
       return;
   }
   ```
   
   and `:99-101` (the normal path):
   
   ```java
   Values v = new Values(filtered, metadata, status);
   collector.emit(stream, v);              // <-- unanchored
   collector.ack(input);
   ```
   
   Let me know, if this is a bug I can submit a PR right away 😄 
   
   ### Error message and/or stacktrace
   
   N/A 
   
   ### How to reproduce
   
   **Affected version:** 3.6.0 (present in earlier releases too — the emit form 
is unchanged)
   **Component:** `stormcrawler-core`, 
`org.apache.stormcrawler.bolt.URLFilterBolt`
   
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to