Add @UpdateForV9 markers on versions (#102441)

We probably wouldn't forget these, but for the sake of completeness this
commit marks several lists of versions with the `@UpdateForV9`
annotation.
This commit is contained in:
David Turner 2023-11-22 08:09:34 +00:00 committed by GitHub
parent 10afe05a82
commit 5e20253fe8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View file

@ -18,6 +18,8 @@ import java.util.function.Predicate;
public enum RestApiVersion { public enum RestApiVersion {
V_8(8), V_8(8),
@UpdateForV9 // v9 will not need to support the v7 REST API
V_7(7); V_7(7);
public final byte major; public final byte major;

View file

@ -9,6 +9,7 @@
package org.elasticsearch; package org.elasticsearch;
import org.elasticsearch.core.Assertions; import org.elasticsearch.core.Assertions;
import org.elasticsearch.core.UpdateForV9;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.Collection; import java.util.Collection;
@ -47,6 +48,7 @@ public class TransportVersions {
return new TransportVersion(id); return new TransportVersion(id);
} }
@UpdateForV9 // remove the transport versions with which v9 will not need to interact
public static final TransportVersion ZERO = def(0); public static final TransportVersion ZERO = def(0);
public static final TransportVersion V_7_0_0 = def(7_00_00_99); public static final TransportVersion V_7_0_0 = def(7_00_00_99);
public static final TransportVersion V_7_0_1 = def(7_00_01_99); public static final TransportVersion V_7_0_1 = def(7_00_01_99);

View file

@ -10,6 +10,7 @@ package org.elasticsearch.index;
import org.apache.lucene.util.Version; import org.apache.lucene.util.Version;
import org.elasticsearch.core.Assertions; import org.elasticsearch.core.Assertions;
import org.elasticsearch.core.UpdateForV9;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.Collection; import java.util.Collection;
@ -44,6 +45,7 @@ public class IndexVersions {
return new IndexVersion(id, luceneVersion); return new IndexVersion(id, luceneVersion);
} }
@UpdateForV9 // remove the index versions with which v9 will not need to interact
public static final IndexVersion ZERO = def(0, Version.LATEST); public static final IndexVersion ZERO = def(0, Version.LATEST);
public static final IndexVersion V_7_0_0 = def(7_00_00_99, Version.LUCENE_8_0_0); public static final IndexVersion V_7_0_0 = def(7_00_00_99, Version.LUCENE_8_0_0);