You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2016/03/02 15:05:31 UTC
[3/7] lucene-solr git commit: upgrade empty index to 6.0.0;
move 5.0 single segment indices to old
upgrade empty index to 6.0.0; move 5.0 single segment indices to old
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/0fd77248
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/0fd77248
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/0fd77248
Branch: refs/heads/master
Commit: 0fd772489608fae7a23533eca1a5ab2de1ddb1ab
Parents: 2ba4803
Author: Mike McCandless <mi...@apache.org>
Authored: Wed Mar 2 06:16:47 2016 -0500
Committer: Mike McCandless <mi...@apache.org>
Committed: Wed Mar 2 06:16:47 2016 -0500
----------------------------------------------------------------------
.../index/TestBackwardsCompatibility.java | 24 +++++++++++--------
.../org/apache/lucene/index/empty.5.0.0.zip | Bin 225 -> 0 bytes
.../org/apache/lucene/index/empty.6.0.0.zip | Bin 0 -> 225 bytes
3 files changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fd77248/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
----------------------------------------------------------------------
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
index 755983b..91a4fec 100644
--- a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
+++ b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
@@ -83,7 +83,7 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
// Backcompat index generation, described below, is mostly automated in:
//
- // dev-tools/scripts/addBackCompatIndexes.py
+ // dev-tools/scripts/addBackcompatIndexes.py
//
// For usage information, see:
//
@@ -319,6 +319,8 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
"4.10.4-nocfs",
"5x-with-4x-segments-cfs",
"5x-with-4x-segments-nocfs",
+ "5.0.0.singlesegment-cfs",
+ "5.0.0.singlesegment-nocfs",
"5.0.0-cfs",
"5.0.0-nocfs",
"5.1.0-cfs",
@@ -342,8 +344,6 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
};
final static String[] oldSingleSegmentNames = {
- "5.0.0.singlesegment-cfs",
- "5.0.0.singlesegment-nocfs"
};
static Map<String,Directory> oldIndexDirs;
@@ -407,10 +407,14 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
for (java.lang.reflect.Field field : Version.class.getDeclaredFields()) {
if (Modifier.isStatic(field.getModifiers()) && field.getType() == Version.class) {
Version v = (Version)field.get(Version.class);
- if (v.equals(Version.LATEST)) continue;
+ if (v.equals(Version.LATEST)) {
+ continue;
+ }
Matcher constant = constantPattern.matcher(field.getName());
- if (constant.matches() == false) continue;
+ if (constant.matches() == false) {
+ continue;
+ }
expectedVersions.add(v.toString() + "-cfs");
}
@@ -439,7 +443,9 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
// find what versions we are testing
List<String> testedVersions = new ArrayList<>();
for (String testedVersion : oldNames) {
- if (testedVersion.endsWith("-cfs") == false) continue;
+ if (testedVersion.endsWith("-cfs") == false) {
+ continue;
+ }
testedVersions.add(testedVersion);
}
Collections.sort(testedVersions);
@@ -819,9 +825,7 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
public void changeIndexWithAdds(Random random, Directory dir, Version nameVersion) throws IOException {
SegmentInfos infos = SegmentInfos.readLatestCommit(dir);
- if (nameVersion.onOrAfter(Version.LUCENE_5_3_0)) {
- assertEquals(nameVersion, infos.getCommitLuceneVersion());
- }
+ assertEquals(nameVersion, infos.getCommitLuceneVersion());
assertEquals(nameVersion, infos.getMinSegmentLuceneVersion());
// open writer
@@ -1288,7 +1292,7 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
}
}
- public static final String emptyIndex = "empty.5.0.0.zip";
+ public static final String emptyIndex = "empty.6.0.0.zip";
public void testUpgradeEmptyOldIndex() throws Exception {
Path oldIndexDir = createTempDir("emptyIndex");
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fd77248/lucene/backward-codecs/src/test/org/apache/lucene/index/empty.5.0.0.zip
----------------------------------------------------------------------
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/empty.5.0.0.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/empty.5.0.0.zip
deleted file mode 100644
index 473693e..0000000
Binary files a/lucene/backward-codecs/src/test/org/apache/lucene/index/empty.5.0.0.zip and /dev/null differ
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fd77248/lucene/backward-codecs/src/test/org/apache/lucene/index/empty.6.0.0.zip
----------------------------------------------------------------------
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/empty.6.0.0.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/empty.6.0.0.zip
new file mode 100644
index 0000000..8ca64d3
Binary files /dev/null and b/lucene/backward-codecs/src/test/org/apache/lucene/index/empty.6.0.0.zip differ