Skip to content

Conversation

@jdyer1
Copy link
Contributor

@jdyer1 jdyer1 commented Jan 14, 2026

This adds ConcurrentUpdateJdkSolrClient.java and refactors the main unit tests to test both the Jetty and the JDK clients.

Unlike with LBAsyncSolrClient and CloudHttp2SolrClient, this new client requires an HttpJdkSolrClient and not any subclass of HttpSolrClientBase. It did not seem possible to implement the abstract method ConcurrentUpdateBaseSolrClient#doSendUpdateStream without requiring the concrete client.

Unlike with ConcurrentUpdateJettySolrClient, this implementation does not loop through the queue in doSendUpdateStream (the base class does this).

I did not extend the tests ConcurrentUpdateSolrClientBadInputTest or ConcurrentUpdateSolrClientMultiCollectionTest to test this new client. These are testing the legacy client only.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for ConcurrentUpdateJdkSolrClient to enable concurrent update operations using the JDK HTTP client. The implementation follows the existing pattern established by ConcurrentUpdateJettySolrClient, but adapts it to work with the JDK client's asynchronous API.

Changes:

  • Added ConcurrentUpdateJdkSolrClient implementation supporting concurrent updates with the JDK HTTP client
  • Refactored existing Jetty client tests into a shared ConcurrentUpdateSolrClientTestBase to support testing both Jetty and JDK client implementations
  • Modified HttpJdkSolrClient to expose a requestInputStreamAsync method for streaming responses
  • Updated CustomBlockingQueue constructor to remove unused maxConsumers parameter

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
ConcurrentUpdateJdkSolrClient.java New implementation of concurrent update client using JDK HTTP client
ConcurrentUpdateSolrClientTestBase.java Extracted shared test logic to enable testing both Jetty and JDK client implementations
ConcurrentUpdateJdkSolrClientTest.java Test implementation for JDK concurrent update client
ConcurrentUpdateJettySolrClientTest.java Refactored to extend shared test base class
HttpJdkSolrClient.java Added protected method to expose async input stream responses
ConcurrentUpdateBaseSolrClient.java Removed unused maxConsumers parameter from CustomBlockingQueue
solr-tests.policy Added URL permissions for JDK HTTP client test

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 11 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@dsmiley dsmiley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 Looks good!

I checked the test refactorings in my IDE and saw things were retained as they were.

I think there's an adoc ref guide page to update and add this client to a list of other known clients.

Copy link
Contributor

@janhoy janhoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this new client. It would be easier to review if all comments were resolved and precommit passing. But here are some initial comments.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jan 15, 2026
@jdyer1 jdyer1 requested a review from janhoy January 15, 2026 18:03
@jdyer1 jdyer1 merged commit 5d1149e into apache:main Jan 16, 2026
8 of 10 checks passed
@jdyer1 jdyer1 deleted the feature/SOLR-18065 branch January 16, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client:solrj documentation Improvements or additions to documentation tests tool:build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants