apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.69k stars 1.04k forks source link

Add utility class for getting information about suspicious system concerns at runtime [LUCENE-4631] #5696

Open asfimport opened 11 years ago

asfimport commented 11 years ago

(Inspired by an idea Uwe mentioned in LUCENE-4630)

Over the years, we've discovered various bugs in JVMs, specific JVM options, combinations of JVM options, combinations of JVMs and operating systems, etc... We've done a fairly decent job of alerting users to these known issues in documentation, and we've attempted to make tests not give false failures if people use these setups – but there is probably more we could be doing to alert users who may not run tests, or read all the docs/blogs.

I think we should add a new class to Lucene Core that provides a simple API for applications to get a list of "warning" Strings based on what lucene can dedect from the currently running JVM/OS. This should be something trivial for people writing apps using lucene to integrate into their code and/or tests (even if they don't use the LuceneTestCase) to notify them if when there are known compatibility issues between their enviornment and the version of lucene this class ships with.

This code should be executed, and all of the resulting warning messages outputed by...

...in addition, specific logic/messages in this code could help implement the annotations Dawid is suggesting in #5695.


Migrated from LUCENE-4631 by Chris M. Hostetter (@hossman) Linked issues:

asfimport commented 11 years ago

Shawn Heisey (@elyograg) (migrated from JIRA)

It seems like SOLR-4132 might be at least marginally related to this ... or it might be something entirely separate. Which way do you see it?