Skip to content

Commit

Permalink
Update version flags after backporting to 1.3.3
Browse files Browse the repository at this point in the history
Relates to #7857
  • Loading branch information
s1monw committed Sep 24, 2014
1 parent 57d8895 commit afe42cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -439,7 +439,7 @@ public void snapshot(SnapshotIndexCommit snapshotIndexCommit) {
boolean snapshotRequired = false;
BlobStoreIndexShardSnapshot.FileInfo fileInfo = snapshots.findPhysicalIndexFile(fileName);
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
// don't have this hash we try to read that hash from the blob store
// in a bwc compatible way.
Expand Down Expand Up @@ -703,7 +703,7 @@ public void restore() {
final Map<String, FileInfo> fileInfos = new HashMap<>();
for (final FileInfo fileInfo : snapshot.indexFiles()) {
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
// don't have this hash we try to read that hash from the blob store
// in a bwc compatible way.
Expand Down
Expand Up @@ -124,7 +124,7 @@ public void readFrom(StreamInput in) throws IOException {
String versionString = in.readOptionalString();
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();
} else {
hash = new BytesRef();
Expand All @@ -139,7 +139,7 @@ public void writeTo(StreamOutput out) throws IOException {
if (out.getVersion().onOrAfter(org.elasticsearch.Version.V_1_3_0)) {
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);
}
}
Expand Down

0 comments on commit afe42cd

Please sign in to comment.