|
@@ -55,7 +55,6 @@ public final class SnapshotInfo implements Comparable<SnapshotInfo>, ToXContent,
|
|
|
|
|
|
public static final String CONTEXT_MODE_PARAM = "context_mode";
|
|
|
public static final String CONTEXT_MODE_SNAPSHOT = "SNAPSHOT";
|
|
|
- public static final Version METADATA_FIELD_INTRODUCED = Version.V_7_3_0;
|
|
|
private static final DateFormatter DATE_TIME_FORMATTER = DateFormatter.forPattern("strictDateOptionalTime");
|
|
|
private static final String SNAPSHOT = "snapshot";
|
|
|
private static final String UUID = "uuid";
|
|
@@ -312,11 +311,7 @@ public final class SnapshotInfo implements Comparable<SnapshotInfo>, ToXContent,
|
|
|
}
|
|
|
version = in.readBoolean() ? Version.readVersion(in) : null;
|
|
|
includeGlobalState = in.readOptionalBoolean();
|
|
|
- if (in.getVersion().onOrAfter(METADATA_FIELD_INTRODUCED)) {
|
|
|
- userMetadata = in.readMap();
|
|
|
- } else {
|
|
|
- userMetadata = null;
|
|
|
- }
|
|
|
+ userMetadata = in.readMap();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -714,9 +709,7 @@ public final class SnapshotInfo implements Comparable<SnapshotInfo>, ToXContent,
|
|
|
out.writeBoolean(false);
|
|
|
}
|
|
|
out.writeOptionalBoolean(includeGlobalState);
|
|
|
- if (out.getVersion().onOrAfter(METADATA_FIELD_INTRODUCED)) {
|
|
|
- out.writeMap(userMetadata);
|
|
|
- }
|
|
|
+ out.writeMap(userMetadata);
|
|
|
}
|
|
|
|
|
|
private static SnapshotState snapshotState(final String reason, final List<SnapshotShardFailure> shardFailures) {
|