-
Notifications
You must be signed in to change notification settings - Fork 810
SOLR-18081: ShardRequestTracker should use a unique key for requests #4068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOLR-18081: ShardRequestTracker should use a unique key for requests #4068
Conversation
gerlowskija
left a comment
There was a problem hiding this 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. | |||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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")) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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
successresponse, it will wait for the actual async status to add that. But a failure in creating an Async request will add afailureresponse, because there will be no async status to add later. Currently a failed async request will add asuccessfor the creation of the async request, and afailureor the status of the async request, which is very confusing.