apache / apache/lucene

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

Open
#5,696 1 comment 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Major type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

(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...

- the CheckIndex command line mode on startup
- the Lucene Demo app(s) on startup
- infostream (if used) the first time it's configured on an IndexWriterConfig
- Solr startup logs
- Solr admin UI (as exposed by the Solr SystemInfoRequestHandler HTTP API)
- in the Lucene test framework after any test runs

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

---
Migrated from [LUCENE-4631](https://issues.apache.org/jira/browse/LUCENE-4631) by Chris M. Hostetter (@hossman)
Linked issues:
- #5695

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the requested runtime checks and warning-message API, then trace the existing startup and configuration paths for CheckIndex, the Lucene demos, IndexWriterConfig, and Solr's SystemInfoRequestHandler. Define the scope and integration points before implementation; done means warnings are exposed to applications and surfaced in the listed command-line, demo, test, logging, and HTTP entry points.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.