Skip to content

Conversation

@alexey-ivanov-es
Copy link
Contributor

@alexey-ivanov-es alexey-ivanov-es commented Feb 14, 2025

PR #122609 introduces the ability for a v9 server to send 0 as the REST version in NodeCapabilitiesRequest when it is implicit. This PR ensures that v8.18/v8.19 can correctly read and handle such requests but does not change how v8 nodes send their NodeCapabilitiesRequest. As a result, v8 nodes will still be able to communicate with both v9 and older v8 nodes.

@alexey-ivanov-es alexey-ivanov-es added >enhancement :Core/Infra/REST API REST infrastructure and utilities auto-backport Automatically create backport pull requests when merged v8.18.0 v8.19.0 labels Feb 14, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @alexey-ivanov-es, I've created a changelog YAML for you.

restApiVersion = RestApiVersion.forMajor(in.readVInt());
byte versionFromMessage = (byte) in.readVInt();
// V9 can send IMPLICIT_REST_API_VERSION
restApiVersionMajor = (versionFromMessage != IMPLICIT_REST_API_VERSION) ? versionFromMessage : null;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

8.18/8.19 should be able to understand message sent by v9 node containing either 9 or 0

out.writeCollection(parameters, StreamOutput::writeString);
out.writeCollection(capabilities, StreamOutput::writeString);
out.writeVInt(restApiVersion.major);
out.writeVInt(restApiVersionMajor);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

8.18/8.19 send only 7 or 8 here, any other node they can form cluster with understands it

@alexey-ivanov-es alexey-ivanov-es marked this pull request as ready for review February 17, 2025 11:04
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Feb 17, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged :Core/Infra/REST API REST infrastructure and utilities >enhancement Team:Core/Infra Meta label for core/infra team v8.18.0 v8.19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants