You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "prakharchaube (via GitHub)" <gi...@apache.org> on 2026/05/23 06:52:12 UTC
[PR] NUTCH-3164 Catch specific exceptions in CrawlDbFilter so plugin errors no longer silently drop URLs [nutch]
prakharchaube opened a new pull request, #918:
URL: https://github.com/apache/nutch/pull/918
## Summary
Both catch blocks in `CrawlDbFilter.map()` caught generic `Exception` and set `url = null`, which silently dropped URLs both for legitimate filtering reasons and for plugin
programming errors (NPE, etc.). The latter masked plugin bugs as ordinary filtering decisions.
## Changes
**Normalizer block**
- `MalformedURLException` — the only legitimate reason to drop. Tracked via `ErrorTracker` (`ErrorType.URL`) and no longer increments `urlsFilteredCounter`, which conflated
filtering with malformed input.
- `RuntimeException` — logged at ERROR and tracked, URL is **not** dropped so plugin bugs do not silently delete data.
**Filter block**
- `URLFilterException` — per the `URLFilter` contract, reserved for internal filter failures (rejection is signaled by returning `null`). Logged at ERROR and tracked, URL is
**not** dropped.
- `RuntimeException` — same handling as above.
All error paths now use `ErrorTracker` for categorized counters and log at ERROR rather than WARN, per [@lewismc's recommendation in the JIRA
discussion](https://issues.apache.org/jira/browse/NUTCH-3164).
## JIRA
[NUTCH-3164](https://issues.apache.org/jira/browse/NUTCH-3164)
## Test plan
- [x] `ant compile` passes locally
- [ ] No new unit tests in this PR; happy to add one if reviewers want a mock plugin throwing each exception type (flag as follow-up otherwise)
## Out of scope (separate tickets if desired)
- Same `catch (Exception)` pattern exists in `Injector.filterNormalize` and ~20 other call sites of `normalizers.normalize` / `filters.filter` — per lewismc comment, those
should be rolled out separately.
- Whether to track normalized URLs as a metric system-wide.
--
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: dev-unsubscribe@nutch.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NUTCH-3164 Catch specific exceptions in CrawlDbFilter so plugin errors no longer silently drop URLs [nutch]
Posted by "sebastian-nagel (via GitHub)" <gi...@apache.org>.
sebastian-nagel merged PR #918:
URL: https://github.com/apache/nutch/pull/918
--
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: dev-unsubscribe@nutch.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NUTCH-3164 Catch specific exceptions in CrawlDbFilter so plugin errors no longer silently drop URLs [nutch]
Posted by "sebastian-nagel (via GitHub)" <gi...@apache.org>.
sebastian-nagel commented on PR #918:
URL: https://github.com/apache/nutch/pull/918#issuecomment-4583835721
Excellent, @prakharchaube!
--
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: dev-unsubscribe@nutch.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NUTCH-3164 Catch specific exceptions in CrawlDbFilter so plugin errors no longer silently drop URLs [nutch]
Posted by "prakharchaube (via GitHub)" <gi...@apache.org>.
prakharchaube commented on PR #918:
URL: https://github.com/apache/nutch/pull/918#issuecomment-4571725961
Hi @sebastian-nagel I have added a UT file, let me know if anything else is needed!
--
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: dev-unsubscribe@nutch.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NUTCH-3164 Catch specific exceptions in CrawlDbFilter so plugin errors no longer silently drop URLs [nutch]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #918:
URL: https://github.com/apache/nutch/pull/918#issuecomment-4564973258
## [](https://sonarcloud.io/dashboard?id=apache_nutch&pullRequest=918) **Quality Gate failed**
Failed conditions
 [7.1% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_nutch&pullRequest=918&metric=new_coverage&view=list) (required ≥ 80%)
<!-- sqra:qg_revision=ffb0ff8d4b9826d745cacb77010fe8a74dac1a43fc1bfa29ca53b9be5c452254 -->
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_nutch&pullRequest=918)
--
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: dev-unsubscribe@nutch.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NUTCH-3164 Catch specific exceptions in CrawlDbFilter so plugin errors no longer silently drop URLs [nutch]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #918:
URL: https://github.com/apache/nutch/pull/918#issuecomment-4583720587
## [](https://sonarcloud.io/dashboard?id=apache_nutch&pullRequest=918) **Quality Gate passed**
Issues
 [9 New issues](https://sonarcloud.io/project/issues?id=apache_nutch&pullRequest=918&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_nutch&pullRequest=918&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_nutch&pullRequest=918&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_nutch&pullRequest=918&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_nutch&pullRequest=918&metric=new_duplicated_lines_density&view=list)
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_nutch&pullRequest=918)
--
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: dev-unsubscribe@nutch.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org