thomasmueller commented on code in PR #1645:
URL: https://github.com/apache/jackrabbit-oak/pull/1645#discussion_r1717971705
##########
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java:
##########
@@ -300,18 +300,42 @@ protected boolean indexTypeOrderedFields(Document doc,
String pname, int tag, Pr
fieldAdded = true;
} else {
long now = System.currentTimeMillis();
- if (now > lastDuplicateWarning +
DUPLICATE_WARNING_INTERVAL_MS) {
+ if (now > lastOrderedPropertyWarning +
ORDERED_PROPERTY_WARNING_INTERVAL_MS) {
log.warn("Duplicate value for ordered field {};
ignoring. Possibly duplicate index definition.", f.name());
- lastDuplicateWarning = now;
+ lastOrderedPropertyWarning = now;
}
}
}
} catch (Exception e) {
- log.warn(
- "[{}] Ignoring ordered property. Could not convert
property {} of type {} to type {} for path {}",
- getIndexName(), pname,
- Type.fromTag(property.getType().tag(), false),
- Type.fromTag(tag, false), path, e);
+ boolean unknownWarning = true;
+ String message = e.getMessage();
+ if (message.startsWith("Not a date string") ||
+ message.startsWith("Unable to parse the provided date
field") ||
+ message.startsWith("For input string")) {
Review Comment:
> I think we should treat each of the messages separately.
At first, I also thought about doing something similar: having a separate
delay for each property. But that would complicate the code, and in my view
unnecessarily: We don't have any evidence that someone (except us) is looking
at these warnings. If someone _is_ looking at the warnings, then he would take
action, no matter what message.
I had a look at the LogSilencer, but it seems it is not protected against
multi-threaded access to the cache. I don't want to risk running out of memory.
So I think the patch should be kept as-is.
--
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]