nick-boss-tech opened a new pull request, #5095: URL: https://github.com/apache/solr/pull/5095
🤖 *AI text below* 🤖 *(posted on behalf of Nick Shanin)* https://issues.apache.org/jira/browse/SOLR-16910 ## What happens today **The slow-update warning loses the request details when the INFO summary is on.** When INFO logging is on, the INFO summary is logged first, and that call clears the request details. The slow-update WARN for the same update then has none of them and shows only the update id lists. ## What this change does **The INFO summary and the slow-update WARN now use the same message, and the request details are cleared only after both.** The processor builds the message once, clears the request details, and then logs the INFO line and the slow WARN from that one message ([LogUpdateProcessorFactory.java](https://github.com/nick-boss-tech/solr/blob/9fce3e9a70582bcf977595a559acc2795b3774ca/solr/core/src/java/org/apache/solr/update/processor/LogUpdateProcessorFactory.java#L201-L220)). The message comes from a helper that no longer clears the request details itself ([getLogString](https://github.com/nick-boss-tech/solr/blob/9fce3e9a70582bcf977595a559acc2795b3774ca/solr/core/src/java/org/apache/solr/update/processor/LogUpdateProcessorFactory.java#L223)). The clearing rule is unchanged. Request details are still cleared only when something is logged. The visible change is that the slow WARN now carries the request details when INFO is on. ## Proof **Three new tests cover the INFO and WARN messages. On the base code, one of them fails.** - `LogUpdateProcessorFactoryTest.testInfoAndSlowWarnBothContainRequestToLog` ([test](https://github.com/nick-boss-tech/solr/blob/9fce3e9a70582bcf977595a559acc2795b3774ca/solr/core/src/test/org/apache/solr/update/processor/LogUpdateProcessorFactoryTest.java#L56-L79)). It checks that the INFO line and the slow WARN both carry the request details, and that the details are cleared afterwards. - `testSlowWarnOnlyContainsRequestToLog` ([test](https://github.com/nick-boss-tech/solr/blob/9fce3e9a70582bcf977595a559acc2795b3774ca/solr/core/src/test/org/apache/solr/update/processor/LogUpdateProcessorFactoryTest.java#L87-L105)). With INFO off, the slow WARN carries the request details. - `testToLogRetainedWhenNothingIsLogged` ([test](https://github.com/nick-boss-tech/solr/blob/9fce3e9a70582bcf977595a559acc2795b3774ca/solr/core/src/test/org/apache/solr/update/processor/LogUpdateProcessorFactoryTest.java#L113-L132)). When nothing is logged, the request details stay in place. On base production code, `LogUpdateProcessorFactoryTest` runs 3 tests with exactly 1 failure, in `testInfoAndSlowWarnBothContainRequestToLog`. With this change, `LogUpdateProcessorFactoryTest` 3/3 passes. Gate run on 2026-10-07 at head `9fce3e9a7058`. Module check rc=0. ## Limits **The `SolrCore.Request` logging item is not addressed.** - The ticket also raises `SolrCore.Request` logging. This branch does not change the `SolrCore` side. The ticket records no desired behavior for it, so no test pins it. I can open a follow-up for it on request. Changelog: `changelog/unreleased/SOLR-16910-log-update-processor-slow-format.yml` ### AI assistance AI agents assisted with research, implementation, review, and drafting. Nick Shanin directed the work and takes responsibility for this contribution. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
