Skip to content

SOLR-5505: LoggingInfoStream not usable in a multi-core setup - #5072

Open
nick-boss-tech wants to merge 3 commits into
apache:mainfrom
nick-boss-tech:solr-5505-submit
Open

nick-boss-tech wants to merge 3 commits into
apache:mainfrom
nick-boss-tech:solr-5505-submit

Conversation

@nick-boss-tech

@nick-boss-tech nick-boss-tech commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖 (posted on behalf of Nick Shanin)

https://issues.apache.org/jira/browse/SOLR-5505

What happens today

With infoStream on, IndexWriter log lines do not name their core.

On main, setting <infoStream>true</infoStream> creates a LoggingInfoStream with no core name (SolrIndexConfig.java). Its lines carry only the component and the thread name (LoggingInfoStream.java).

What this change does

Each log line gets the core name as a [core] segment.

When the configured stream is a LoggingInfoStream, each IndexWriter gets its own copy that knows the core name (SolrIndexConfig.java). A line now reads [core][component][thread]: message (LoggingInfoStream.java). Any other InfoStream passes through unchanged.

API addition: the public constructor LoggingInfoStream(String coreName) (LoggingInfoStream.java). The no-argument constructor stays.

Behavior change: with infoStream on, every line gains the [core] segment. Log parsers that match the old format will see the change. No setting keeps the old format.

Proof

TestInfoStreamLogging.testMessagesNameTheCore checks that a logged line names the core.

The test is TestInfoStreamLogging.java.

  • On base production code, TestInfoStreamLogging runs 2 tests with exactly 1 failure (testMessagesNameTheCore). The base line has no core name, so the [core][IW] check is the one that fails.
  • Verified 2026-10-07 at head d382d9a21e26: TestInfoStreamLogging 2/2, neighbor TestSolrIndexConfig 2/2. The module checks pass.

A choice to check

The core name is always on. The other route makes it opt-in.

The other route adds a setting that turns the [core] segment on. The old format stays the default, and that change's changelog type would be added. As implemented, there is no setting and the changelog type is changed.

Was an always-on core name the right call, or should an opt-in setting keep the old format by default?

Limits

Two parts are not covered by a test.

  • The reload path is checked by reading only. Each reload builds a new IndexWriterConfig, so the core name follows the core.
  • The new format is not tested against any log parser.
  • A follow-up submission is planned for a reload test and a log-parser check.

Changelog: changelog/unreleased/SOLR-5505-infostream-core-name.yml

AI assistance

AI agents assisted with research, implementation, review, and drafting. Nick Shanin directed the work and takes responsibility for this contribution.

@nick-boss-tech nick-boss-tech changed the title SOLR-5505: LoggingInfoStream not usabe in a multi-core setup SOLR-5505: LoggingInfoStream not usable in a multi-core setup Oct 9, 2026
@nick-boss-tech
nick-boss-tech marked this pull request as ready for review October 9, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant