mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 09:28:55 -04:00
Align TransportVersion#bestKnownVersion
with 8.x (#123801)
In backporting #123397 to 8.x we discovered that we needed to generalize `TransportVersion#bestKnownVersion` slightly to handle older versions. This commit forward-ports this change to keep the branches aligned.
This commit is contained in:
parent
18256a5f28
commit
32f182f8b0
1 changed files with 1 additions and 1 deletions
|
@ -131,7 +131,7 @@ public record TransportVersion(int id) implements VersionId<TransportVersion> {
|
||||||
* there are no such versions.
|
* there are no such versions.
|
||||||
*/
|
*/
|
||||||
public TransportVersion bestKnownVersion() {
|
public TransportVersion bestKnownVersion() {
|
||||||
if (VersionsHolder.ALL_VERSIONS_MAP.containsKey(id)) {
|
if (isKnown()) {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
TransportVersion bestSoFar = TransportVersions.ZERO;
|
TransportVersion bestSoFar = TransportVersions.ZERO;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue