Update version flags after backporting to 1.3.3

Relates to #7857
This commit is contained in:
Simon Willnauer 2014-09-24 15:07:42 +02:00
parent f37815a53b
commit ea49a3e269
2 changed files with 4 additions and 4 deletions

View File

@ -439,7 +439,7 @@ public class BlobStoreIndexShardRepository extends AbstractComponent implements
boolean snapshotRequired = false; boolean snapshotRequired = false;
BlobStoreIndexShardSnapshot.FileInfo fileInfo = snapshots.findPhysicalIndexFile(fileName); BlobStoreIndexShardSnapshot.FileInfo fileInfo = snapshots.findPhysicalIndexFile(fileName);
try { try {
// in 1.4.0 we added additional hashes for .si / segments_N files // in 1.3.3 we added additional hashes for .si / segments_N files
// to ensure we don't double the space in the repo since old snapshots // to ensure we don't double the space in the repo since old snapshots
// don't have this hash we try to read that hash from the blob store // don't have this hash we try to read that hash from the blob store
// in a bwc compatible way. // in a bwc compatible way.
@ -703,7 +703,7 @@ public class BlobStoreIndexShardRepository extends AbstractComponent implements
final Map<String, FileInfo> fileInfos = new HashMap<>(); final Map<String, FileInfo> fileInfos = new HashMap<>();
for (final FileInfo fileInfo : snapshot.indexFiles()) { for (final FileInfo fileInfo : snapshot.indexFiles()) {
try { try {
// in 1.4.0 we added additional hashes for .si / segments_N files // in 1.3.3 we added additional hashes for .si / segments_N files
// to ensure we don't double the space in the repo since old snapshots // to ensure we don't double the space in the repo since old snapshots
// don't have this hash we try to read that hash from the blob store // don't have this hash we try to read that hash from the blob store
// in a bwc compatible way. // in a bwc compatible way.

View File

@ -124,7 +124,7 @@ public class StoreFileMetaData implements Streamable {
String versionString = in.readOptionalString(); String versionString = in.readOptionalString();
writtenBy = Lucene.parseVersionLenient(versionString, null); writtenBy = Lucene.parseVersionLenient(versionString, null);
} }
if (in.getVersion().onOrAfter(org.elasticsearch.Version.V_1_4_0_Beta1)) { if (in.getVersion().onOrAfter(org.elasticsearch.Version.V_1_3_3)) {
hash = in.readBytesRef(); hash = in.readBytesRef();
} else { } else {
hash = new BytesRef(); hash = new BytesRef();
@ -139,7 +139,7 @@ public class StoreFileMetaData implements Streamable {
if (out.getVersion().onOrAfter(org.elasticsearch.Version.V_1_3_0)) { if (out.getVersion().onOrAfter(org.elasticsearch.Version.V_1_3_0)) {
out.writeOptionalString(writtenBy == null ? null : writtenBy.toString()); out.writeOptionalString(writtenBy == null ? null : writtenBy.toString());
} }
if (out.getVersion().onOrAfter(org.elasticsearch.Version.V_1_4_0_Beta1)) { if (out.getVersion().onOrAfter(org.elasticsearch.Version.V_1_3_3)) {
out.writeBytesRef(hash); out.writeBytesRef(hash);
} }
} }