Skip to content

Commit 6b87785

Browse files
committed
Mute version assertions
Tracking elastic#38556
1 parent ea1822e commit 6b87785

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

server/src/main/java/org/elasticsearch/action/resync/ResyncReplicationRequest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ public Translog.Operation[] getOperations() {
6666

6767
@Override
6868
public void readFrom(final StreamInput in) throws IOException {
69-
assert Version.CURRENT.major <= 7;
69+
// TODO: https://github.com/elastic/elasticsearch/issues/38556
70+
//assert Version.CURRENT.major <= 7;
7071
if (in.getVersion().equals(Version.V_6_0_0)) {
7172
/*
7273
* Resync replication request serialization was broken in 6.0.0 due to the elements of the stream not being prefixed with a

server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataCreateIndexService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,8 @@ public ClusterState execute(ClusterState currentState) throws Exception {
590590

591591
static int getNumberOfShards(final Settings.Builder indexSettingsBuilder) {
592592
// TODO: this logic can be removed when the current major version is 8
593-
assert Version.CURRENT.major == 7;
593+
// TODO: https://github.com/elastic/elasticsearch/issues/38556
594+
// assert Version.CURRENT.major == 7;
594595
final int numberOfShards;
595596
final Version indexVersionCreated =
596597
Version.fromId(Integer.parseInt(indexSettingsBuilder.get(IndexMetaData.SETTING_INDEX_VERSION_CREATED.getKey())));

server/src/main/java/org/elasticsearch/gateway/MetaStateService.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ private Tuple<Manifest, MetaData> loadFullStateBWC() throws IOException {
117117

118118
if (globalMetaData != null) {
119119
metaDataBuilder = MetaData.builder(globalMetaData);
120-
// assert Version.CURRENT.major < 8 : "failed to find manifest file, which is mandatory staring with Elasticsearch version 8.0";
120+
// TODO https://github.com/elastic/elasticsearch/issues/38556
121+
// assert Version.CURRENT.major < 8 : "failed to find manifest file, which is mandatory staring with Elasticsearch version 8.0";
121122
} else {
122123
metaDataBuilder = MetaData.builder();
123124
}
@@ -126,7 +127,8 @@ private Tuple<Manifest, MetaData> loadFullStateBWC() throws IOException {
126127
Tuple<IndexMetaData, Long> indexMetaDataAndGeneration =
127128
INDEX_META_DATA_FORMAT.loadLatestStateWithGeneration(logger, namedXContentRegistry,
128129
nodeEnv.resolveIndexFolder(indexFolderName));
129-
// assert Version.CURRENT.major < 8 : "failed to find manifest file, which is mandatory staring with Elasticsearch version 8.0";
130+
// TODO https://github.com/elastic/elasticsearch/issues/38556
131+
// assert Version.CURRENT.major < 8 : "failed to find manifest file, which is mandatory staring with Elasticsearch version 8.0";
130132
IndexMetaData indexMetaData = indexMetaDataAndGeneration.v1();
131133
long generation = indexMetaDataAndGeneration.v2();
132134
if (indexMetaData != null) {

server/src/main/java/org/elasticsearch/transport/RemoteClusterAware.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ public abstract class RemoteClusterAware {
5757

5858
static {
5959
// remove search.remote.* settings in 8.0.0
60-
assert Version.CURRENT.major < 8;
60+
// TODO https://github.com/elastic/elasticsearch/issues/38556
61+
// assert Version.CURRENT.major < 8;
6162
}
6263

6364
public static final Setting.AffixSetting<List<String>> SEARCH_REMOTE_CLUSTERS_SEEDS =

server/src/main/java/org/elasticsearch/transport/RemoteClusterService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ public final class RemoteClusterService extends RemoteClusterAware implements Cl
6969

7070
static {
7171
// remove search.remote.* settings in 8.0.0
72-
assert Version.CURRENT.major < 8;
72+
// TODO
73+
// assert Version.CURRENT.major < 8;
7374
}
7475

7576
public static final Setting<Integer> SEARCH_REMOTE_CONNECTIONS_PER_CLUSTER =

0 commit comments

Comments
 (0)