mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-19 04:45:07 -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.
|
||||
*/
|
||||
public TransportVersion bestKnownVersion() {
|
||||
if (VersionsHolder.ALL_VERSIONS_MAP.containsKey(id)) {
|
||||
if (isKnown()) {
|
||||
return this;
|
||||
}
|
||||
TransportVersion bestSoFar = TransportVersions.ZERO;
|
||||
|
|
Loading…
Add table
Reference in a new issue