You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "serhiy-bzhezytskyy (via GitHub)" <gi...@apache.org> on 2026/07/15 05:24:13 UTC
[PR] SOLR-3284: fix RemoteSolrException NPE when remoteError is null [solr]
serhiy-bzhezytskyy opened a new pull request, #4637:
URL: https://github.com/apache/solr/pull/4637
Follow-up to the SOLR-3284 error path (David flagged this on #4632 as worth its own change).
`RemoteSolrException(remoteHost, code, remoteError, skipRetry)` built its details with `Map.of(...)`, which rejects null values, so it threw `NullPointerException` when `remoteError` was null.
A null `remoteError` is expected: `ConcurrentUpdateBaseSolrClient` calls this constructor in a `finally` block with `remoteError` still null whenever a non-OK response has no parseable error body (a proxy 502/503, a truncated or non-Solr response). The NPE then masked the actual HTTP status the exception was meant to carry. `HttpSolrClient` has a similar call site.
Switched to `Utils.makeMap` (the map building idiom already used elsewhere in the code), which tolerates a null value. Added `RemoteSolrExceptionTest` covering the null case (the regression) plus the consumers of the resulting exception, and the non-null case.
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-3284: fix RemoteSolrException NPE when remoteError is null [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on code in PR #4637:
URL: https://github.com/apache/solr/pull/4637#discussion_r3591884287
##########
changelog/unreleased/remotesolrexception-null-remoteerror-npe.yml:
##########
Review Comment:
eh... IMO it's minor enough as to not bother with a changelog. Besides, we have a separate SOLR-3284 linked changelog and I'm not sure we support this. The NPE fixed didn't even exist when SOLR-3284 was created so it's quite dubious to even associate it.
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-3284: fix RemoteSolrException NPE when remoteError is null [solr]
Posted by "serhiy-bzhezytskyy (via GitHub)" <gi...@apache.org>.
serhiy-bzhezytskyy commented on PR #4637:
URL: https://github.com/apache/solr/pull/4637#issuecomment-4988375730
correction on the CI red — it's not a flake. IndexFetcherPacketProtocolTest fails deterministically on clean main (no changes) with the CI seed `6FA33BD8BF6D0D4C`, and passes with the default random seed, which is why it looked flaky at first. so it's a pre-existing seed-dependent failure on main, unrelated to this PR.
the `return 1` is an Adler32 checksum mismatch in `fetchPackets` — looks like the SOLR-18098 packet test is fragile under certain randomized codecs. i'll file a separate issue for it.
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-3284: fix RemoteSolrException NPE when remoteError is null [solr]
Posted by "serhiy-bzhezytskyy (via GitHub)" <gi...@apache.org>.
serhiy-bzhezytskyy commented on PR #4637:
URL: https://github.com/apache/solr/pull/4637#issuecomment-4988335935
Removed the changelog entry.
Also checked the Crave CI red — it's IndexFetcherPacketProtocolTest (`fetchPackets return code mismatch expected:<0> but was:<1>`), all 14 failures in replication file-fetching. Unrelated to this change (a one-line null-guard in RemoteSolrException) and it passes locally, so looks like a flake on that test.
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-3284: fix RemoteSolrException NPE when remoteError is null [solr]
Posted by "serhiy-bzhezytskyy (via GitHub)" <gi...@apache.org>.
serhiy-bzhezytskyy commented on PR #4637:
URL: https://github.com/apache/solr/pull/4637#issuecomment-4988464330
filed the fix for that pre-existing test failure: #4642 (SOLR-18098). forces an FS directory factory in IndexFetcherPacketProtocolTest so the randomized RAM directory doesn't hide the staged file. this PR's CI red was entirely that test.
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-3284: fix RemoteSolrException NPE when remoteError is null [solr]
Posted by "serhiy-bzhezytskyy (via GitHub)" <gi...@apache.org>.
serhiy-bzhezytskyy commented on PR #4637:
URL: https://github.com/apache/solr/pull/4637#issuecomment-4991437636
Update on that IndexFetcherPacketProtocolTest failure: it turned out Jason had already fixed it in #4624 (merged to main 07-15, using DirContext.REPLICATION). My #4642 was a duplicate and I've closed it. So this PR's CI just needs a run against current main — the flake is already fixed there.
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-3284: fix RemoteSolrException NPE when remoteError is null [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley merged PR #4637:
URL: https://github.com/apache/solr/pull/4637
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org