-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Migrate org.elasticsearch.search to TransportVersion #93091
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
Conversation
Add initial set of javadocs
Add initial set of javadocs
TransportVersion tests
c1a0df4 to
64aa21a
Compare
| throw new IllegalArgumentException( | ||
| "Versions before 8.7.0 don't support multiple [knn] search clauses and search was sent to [" | ||
| + out.getVersion() | ||
| "Versions before 8070099 don't support multiple [knn] search clauses and search was sent to [" |
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.
Do we want to keep Version 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.
I don't think we want Version, it wouldn't make sense. However, this exception seems odd. It looks like some validation that should have happened before we are trying to serialize results. Perhaps someone from the Search area can clarify why such validation is happening so late.
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.
@benwtrent What is the exception here needed for?
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.
This is the exact same validation that occurs up in SearchSourceBuilder. We cannot allow serializing this to older nodes if there are more than one KNN search results. Similarly, we don't allow search source builder to serialize to older nodes if it has more than one KNN search clause.
I fail to see how this is a problem here, but NOT a problem in the SearchSourceBuilder.
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.
It's not a problem, it's more a question on the importance of the message containing the actual self managed node version, vs an opaque version for the transport protocol. What I find odd here is this error being thrown as an IllegalArgumentException, which will go back to users as a 400 http response. Normally such errors should be checked long before we are serializing results.
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.
If this is only a stopgap exception aimed at developers only, then we can leave it as the transport version
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.
If this is only a stopgap exception aimed at developers only, then we can leave it as the transport version
Non-administrators wouldn't care about this exception, exactly. Administrators or folks debugging failures will care.
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.
I think a problem of identifying a "code version running" is not only limited to this one exception here. We will have to have some kind of system with a matrix of transport version - commit/onprem version.
Perhaps for this case specifically we change this as per @benwtrent suggestion. "Cannot serialize multiple KNN results to older node with transport version:" or similar (the 'older node' feels strange)
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.
I've created #93387 to check exception messages now using transport version
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.
I've updated the exception message
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
|
@elasticsearchmachine rerun elasticsearch-ci/part-1 |
pgomulka
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.
LGTM
Migrate files in
org.elasticsearch.searchto useTransportVersionAll changes are
s/Version/TransportVersion/, but see comments