[
https://issues.apache.org/jira/browse/NIFI-13860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17890101#comment-17890101
]
ASF subversion and git services commented on NIFI-13860:
--------------------------------------------------------
Commit 6fb229b23c8ce5b933b43b1ef978a4bb738ec9e5 in nifi's branch
refs/heads/main from tpalfy
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=6fb229b23c ]
NIFI-13860 Avoid Throwing Exceptions for Failures in IPLookupService (#9372)
Signed-off-by: David Handermann <[email protected]>
> IPLookupService throws exception when lookup fails
> --------------------------------------------------
>
> Key: NIFI-13860
> URL: https://issues.apache.org/jira/browse/NIFI-13860
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Reporter: Tamas Palfy
> Assignee: Tamas Palfy
> Priority: Major
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> The
> {code:java}
> Optional<Record> lookup
> {code}
> in {{IPLookupService}} calls into {{com.maxmind.geoip2.DatabaseReader}}
> methods that throw {{AddressNotFoundException}} when an IP lookup fails.
> When used in the {{LookupRecord}} processor a single unrecognized entry in a
> list of IPs can cause an error and the entire flowfile is routed to the
> _failure_ relationship instead of routing the unfound records to _unmatched_
> and keep routing the found ones to _matched_.
> The {{DatabaseReader}} has {{tryX}} methods that return an {{Optional}}
> instead of throwing an exception when the IP is not found in the DB. All
> lookups should use this variant.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)