Skip to content

Commit 2e2b792

Browse files
committed
start migration to transport version set
1 parent 430ff53 commit 2e2b792

File tree

24 files changed

+146
-432
lines changed

24 files changed

+146
-432
lines changed

server/src/main/java/org/elasticsearch/TransportVersion.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import org.elasticsearch.plugins.ExtensionLoader;
1717

1818
import java.io.IOException;
19+
import java.util.ArrayList;
1920
import java.util.Collection;
2021
import java.util.Collections;
2122
import java.util.List;
@@ -195,14 +196,24 @@ private static class VersionsHolder {
195196
.orElse(Collections.emptyList());
196197

197198
if (extendedVersions.isEmpty()) {
198-
ALL_VERSIONS = TransportVersions.DEFINED_VERSIONS;
199+
//ALL_VERSIONS = TransportVersions.DEFINED_VERSIONS;
200+
// TODO: remove for testing
201+
ALL_VERSIONS = new ArrayList<>(TransportVersions.DEFINED_VERSIONS);
202+
ALL_VERSIONS.add(new TransportVersion(9114000));
203+
ALL_VERSIONS.add(new TransportVersion(9115000));
204+
ALL_VERSIONS.add(new TransportVersion(8841063));
205+
ALL_VERSIONS.add(new TransportVersion(9112001));
206+
ALL_VERSIONS.add(new TransportVersion(9116000));
207+
ALL_VERSIONS.add(new TransportVersion(9117000));
208+
ALL_VERSIONS.add(new TransportVersion(9118000));
209+
// TODO: end testing
199210
} else {
200211
ALL_VERSIONS = Stream.concat(TransportVersions.DEFINED_VERSIONS.stream(), extendedVersions.stream()).sorted().toList();
201212
}
202213

203214
ALL_VERSIONS_MAP = ALL_VERSIONS.stream().collect(Collectors.toUnmodifiableMap(TransportVersion::id, Function.identity()));
204215

205-
CURRENT = ALL_VERSIONS.getLast();
216+
CURRENT = new TransportVersion(9118000); // TODO: fix - ALL_VERSIONS.getLast();
206217
}
207218
}
208219
}

0 commit comments

Comments
 (0)