fabriziofortino commented on code in PR #670:
URL: https://github.com/apache/jackrabbit-oak/pull/670#discussion_r949989809
##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/async/ElasticResultRowAsyncIterator.java:
##########
@@ -336,13 +336,10 @@ public void onFailure(Throwable t) {
System.currentTimeMillis() - searchStartTime);
// Check in case errorRef is already set - this seems unlikely
since we close the scanner once we hit failure.
// But still, in case this do happen, we will log a warn.
- Throwable error = errorRef.getAndSet(t);
+ Throwable error = errorRef.getAndSet(new
ElasticAsyncQueryException(t, ElasticIndexUtils.toString(query)));
if (error != null) {
LOG.warn("Error reference for async iterator was previously
set to {}. It has now been reset to new error {}", error.getMessage(),
t.getMessage());
}
-
- LOG.error("Error retrieving data for jcr query [{}] ::
Corresponding ES query {} : closing scanner, notifying listeners",
Review Comment:
we were logging it twice with slightly different content. The newly
introduced exception shows a message with the entire content. It is printed in
`hasNext()`
--
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]