thomasmueller commented on a change in pull request #339:
URL: https://github.com/apache/jackrabbit-oak/pull/339#discussion_r687626561
##########
File path:
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java
##########
@@ -1050,6 +1051,7 @@ public void done(String now) {
}
public void failed(Exception e) {
+ boolean isConcurrentUpdateException = (e.getMessage() != null) &&
(e.getMessage().startsWith(CONCURRENT_EXCEPTIPN_MSG));
Review comment:
what about adding "e instanceof ConcurrentUpdateException" ?
##########
File path:
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java
##########
@@ -1066,13 +1068,21 @@ public void failed(Exception e) {
// reusing value so value display is consistent
failingSince = latestErrorTime;
latestErrorWarn = System.currentTimeMillis();
- log.warn("[{}] The index update failed", name, e);
+ if (isConcurrentUpdateException) {
+ log.info("[{}]", name, e.getMessage());
+ } else {
+ log.warn("[{}] The index update failed", name, e);
+ }
} else {
// subsequent occurrences
boolean warn = System.currentTimeMillis() - latestErrorWarn >
ERROR_WARN_INTERVAL;
if (warn) {
- latestErrorWarn = System.currentTimeMillis();
Review comment:
I would keep latestErrorWarn where it is... same as you did above.
##########
File path:
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java
##########
@@ -1050,6 +1051,7 @@ public void done(String now) {
}
public void failed(Exception e) {
+ boolean isConcurrentUpdateException = (e.getMessage() != null) &&
(e.getMessage().startsWith(CONCURRENT_EXCEPTIPN_MSG));
Review comment:
I would make it multi-line, as the line is quite long.
--
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]