Repository navigation
Conversation
|
Automated PR readiness judgements (LLM-generated; may be wrong; not updated on later pushes).
|
…warded to the leader, which skips the MirroringUpdateProcessor in the chain, and these deletes are not mirrored as a result. Instead send DBI-s without mirroring just for local processing at the source cluster, and accumulate the doc-ids locally and mirror the accumulated page of id-s directly from the non-leader replica that is doing the expansion.
Contributor
|
I appreciate when my distrust of mocks is borne out: _ unit tests mock the client_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://issues.apache.org/jira/browse/SOLR-18687
Fix CrossDC delete-by-query expansion failing with HTTP 500
With
solr.crossdc.expandDbq=expand(the default), the CrossDC producer failed every delete-by-query except*:*with an HTTP 500 caused by aNullPointerException.MirroringUpdateProcessor.processDeleteran its cursorMark query and the follow-updeleteByIdthroughCoreContainer.getDefaultHttpSolrClient(). That client has no base URL, so building the request URL throws. The delete was not applied on the source either, so nothing was deleted or mirrored. The workaround was-Dsolr.crossdc.expandDbq=none.The regression came in with SOLR-16503 (
98906f41a5). Before it, this code built its ownHttpSolrClientpointed at the node's base URL. The refactor swapped in the shared default client, which is meant forrequestWithBaseUrl(...). Nothing caught it because the only real-cluster test of expansion (DeleteByQueryToIdTest.testExpandDBQ) has been@Ignored since the module was absorbed, and the unit tests mock the client.The fix uses
getZkController().getSolrClient(), the ZooKeeper-awareCloudSolrClient, for both the query and the delete-by-id requests.MirroringDbqExpansionCloudTestis new and runs the expansion against a real 3-node cluster without Kafka or Docker. It coversexpand,none, the default,*:*(never expanded), and a delete that needs several cursor pages. To plug in a recording factory it adds a${solr.crossdc.processorFactory:...}property default to thecloud-minimalsolrconfig.xml. Behavior is unchanged when the property is unset. Delete requests are sent to random nodes in the cluster to eliminate potential bugs related to data locality.🤖 Generated with Claude Code (Opus 5.5), reviewed and tweaked by an actual human ;)