dan-s1 commented on code in PR #11682:
URL: https://github.com/apache/nifi/pull/11682#discussion_r4030353040
##########
nifi-framework-bundle/nifi-framework-extensions/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/index/lucene/QueryTask.java:
##########
@@ -156,7 +156,7 @@ public void run() {
final Tuple<List<ProvenanceEventRecord>, Long> eventsAndTotalHits
= readDocuments(topDocs, storedFields);
- if (eventsAndTotalHits == null) {
+ if (eventsAndTotalHits.getKey().isEmpty() &&
eventsAndTotalHits.getValue() == 0L) {
Review Comment:
Should then the `topDocs == null` in the beginning of `readDocuments` be
removed
```
if (topDocs == null || topDocs.totalHits.value() == 0) {
return new Tuple<>(Collections.emptyList(), 0L);
}
```
as it should never be null.
Also isn't it possible to hit the if conditional if `totalHits` in `topDocs`
is 0?
--
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]