Skip to content

Conversation

@HoustonPutman
Copy link
Contributor

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

Instead of indexing results by just the node name, the results should be indexed by node and replica, which is a unique key.

Also, when async is used, the failures and successes should be added just once to the result list. So a success in creating an Async request will not add a success response, it will wait for the actual async status to add that. But a failure in creating an Async request will add a failure response, because there will be no async status to add later. Currently a failed async request will add a success for the creation of the async request, and a failure or the status of the async request, which is very confusing.

Copy link
Contributor

@gerlowskija gerlowskija left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@@ -0,0 +1,9 @@
# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc
title: ShardRequestTracker should index results by node and replica rather than just node. This fixes requests that had multiple responses from a single node that got over-written.
Copy link
Contributor

Choose a reason for hiding this comment

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

[0] There might be a way to rephrase this to make the impact a little more comprehensible to the average user. Maybe:

Admin API responses now include the responses from all sub-requests, even in the case of colocated replicas.

Meh - now that I've written it up, I don't really like my alternative any better. It's a tough thing to convey concisely. Feel free to ignore me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made it a bit better hopefully

}
continue;

} else if (r.equals("submitted")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

[+1] Great catch.

Obviously a different PR, but we should really convert this logic here and elsewhere into a switch-case, so we'll get warnings if we ever neglect to handle a particular value as we did here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed, I think this logic could be cleaned up a lot. But I wanted to limit the scope of my PR, for obvious reasons.

@HoustonPutman HoustonPutman merged commit d766e9e into apache:main Jan 29, 2026
5 of 6 checks passed
@HoustonPutman HoustonPutman deleted the solr-18081-shard-request-tracker-replica-name branch January 29, 2026 16:48
HoustonPutman added a commit that referenced this pull request Jan 29, 2026
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.

2 participants