mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-25 01:19:02 +00:00
Revert Lucene upgrade
This commit is contained in:
parent
15c75b1967
commit
ab3be76644
@ -67,8 +67,6 @@ PLUGINS = [('bigdesk', 'lukas-vlcek/bigdesk'),
|
||||
('head', 'mobz/elasticsearch-head')]
|
||||
|
||||
LOG = env.get('ES_RELEASE_LOG', '/tmp/elasticsearch_release.log')
|
||||
if os.path.exists(LOG):
|
||||
raise RuntimeError('please remove old release log %s first' % LOG)
|
||||
|
||||
def log(msg):
|
||||
log_plain('\n%s' % msg)
|
||||
@ -308,24 +306,6 @@ def wait_for_node_startup(host='127.0.0.1', port=9200,timeout=15):
|
||||
|
||||
return False
|
||||
|
||||
# Ensures we are using a true Lucene release, not a snapshot build:
|
||||
def verify_lucene_version():
|
||||
s = open('pom.xml', encoding='utf-8').read()
|
||||
if s.find('download.elasticsearch.org/lucenesnapshots') != -1:
|
||||
raise RuntimeError('pom.xml contains download.elasticsearch.org/lucenesnapshots repository: remove that before releasing')
|
||||
|
||||
m = re.search(r'<lucene.version>(.*?)</lucene.version>', s)
|
||||
if m is None:
|
||||
raise RuntimeError('unable to locate lucene.version in pom.xml')
|
||||
lucene_version = m.group(1)
|
||||
|
||||
m = re.search(r'<lucene.maven.version>(.*?)</lucene.maven.version>', s)
|
||||
if m is None:
|
||||
raise RuntimeError('unable to locate lucene.maven.version in pom.xml')
|
||||
lucene_maven_version = m.group(1)
|
||||
if lucene_version != lucene_maven_version:
|
||||
raise RuntimeError('pom.xml is still using a snapshot release of lucene (%s): cutover to a real lucene release before releasing' % lucene_maven_version)
|
||||
|
||||
# Checks the pom.xml for the release version.
|
||||
# This method fails if the pom file has no SNAPSHOT version set ie.
|
||||
# if the version is already on a release version we fail.
|
||||
@ -584,7 +564,6 @@ if __name__ == '__main__':
|
||||
print(' JAVA_HOME is [%s]' % JAVA_HOME)
|
||||
print(' Running with maven command: [%s] ' % (MVN))
|
||||
if build:
|
||||
verify_lucene_version()
|
||||
release_version = find_release_version(src_branch)
|
||||
ensure_no_open_tickets(release_version)
|
||||
if not dry_run:
|
||||
|
29
pom.xml
29
pom.xml
@ -31,8 +31,7 @@
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<lucene.version>4.10.1</lucene.version>
|
||||
<lucene.maven.version>4.10.1-snapshot-1627159</lucene.maven.version>
|
||||
<lucene.version>4.10.0</lucene.version>
|
||||
<tests.jvms>auto</tests.jvms>
|
||||
<tests.shuffle>true</tests.shuffle>
|
||||
<tests.output>onerror</tests.output>
|
||||
@ -46,10 +45,6 @@
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>Lucene snapshots</id>
|
||||
<url>https://download.elasticsearch.org/lucenesnapshots/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>Codehaus Snapshots</id>
|
||||
<url>http://repository.codehaus.org/</url>
|
||||
@ -72,7 +67,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-test-framework</artifactId>
|
||||
<version>${lucene.maven.version}</version>
|
||||
<version>${lucene.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@ -85,19 +80,19 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-core</artifactId>
|
||||
<version>${lucene.maven.version}</version>
|
||||
<version>${lucene.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-analyzers-common</artifactId>
|
||||
<version>${lucene.maven.version}</version>
|
||||
<version>${lucene.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-queries</artifactId>
|
||||
<version>${lucene.maven.version}</version>
|
||||
<version>${lucene.version}</version>
|
||||
<scope>compile</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
@ -109,19 +104,19 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-memory</artifactId>
|
||||
<version>${lucene.maven.version}</version>
|
||||
<version>${lucene.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-highlighter</artifactId>
|
||||
<version>${lucene.maven.version}</version>
|
||||
<version>${lucene.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-queryparser</artifactId>
|
||||
<version>${lucene.maven.version}</version>
|
||||
<version>${lucene.version}</version>
|
||||
<scope>compile</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
@ -133,26 +128,26 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-suggest</artifactId>
|
||||
<version>${lucene.maven.version}</version>
|
||||
<version>${lucene.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-join</artifactId>
|
||||
<version>${lucene.maven.version}</version>
|
||||
<version>${lucene.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!-- Lucene spatial, make sure when upgrading to work with latest version of jts/spatial4j dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-spatial</artifactId>
|
||||
<version>${lucene.maven.version}</version>
|
||||
<version>${lucene.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-expressions</artifactId>
|
||||
<version>${lucene.maven.version}</version>
|
||||
<version>${lucene.version}</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
@ -205,7 +205,7 @@ public class Version implements Serializable {
|
||||
public static final int V_1_5_0_ID = /*00*/1050099;
|
||||
public static final Version V_1_5_0 = new Version(V_1_5_0_ID, false, org.apache.lucene.util.Version.LUCENE_4_10_0);
|
||||
public static final int V_2_0_0_ID = /*00*/2000099;
|
||||
public static final Version V_2_0_0 = new Version(V_2_0_0_ID, true, org.apache.lucene.util.Version.LUCENE_4_10_1);
|
||||
public static final Version V_2_0_0 = new Version(V_2_0_0_ID, true, org.apache.lucene.util.Version.LUCENE_4_10_0);
|
||||
|
||||
public static final Version CURRENT = V_2_0_0;
|
||||
|
||||
|
@ -237,7 +237,7 @@ public abstract class TransportBroadcastOperationAction<Request extends Broadcas
|
||||
if (logger.isDebugEnabled()) {
|
||||
if (t != null) {
|
||||
if (!TransportActions.isShardNotAvailableException(t)) {
|
||||
logger.debug("{}: failed to execute [{}]", t, shard != null ? shard.shortSummary() : shardIt.shardId(), request);
|
||||
logger.debug("{}: failed to executed [{}]", t, shard != null ? shard.shortSummary() : shardIt.shardId(), request);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,6 @@ import org.elasticsearch.index.analysis.NamedAnalyzer;
|
||||
import org.elasticsearch.index.fielddata.IndexFieldData;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
|
||||
import static org.elasticsearch.common.lucene.search.NoopCollector.NOOP_COLLECTOR;
|
||||
|
||||
@ -71,7 +70,7 @@ public class Lucene {
|
||||
}
|
||||
try {
|
||||
return Version.parse(version);
|
||||
} catch (ParseException e) {
|
||||
} catch (IllegalArgumentException e) {
|
||||
logger.warn("no version match {}, default to {}", version, defaultVersion, e);
|
||||
return defaultVersion;
|
||||
}
|
||||
@ -563,7 +562,7 @@ public class Lucene {
|
||||
if (Strings.hasLength(toParse)) {
|
||||
try {
|
||||
return Version.parseLeniently(toParse);
|
||||
} catch (ParseException e) {
|
||||
} catch (IllegalArgumentException e) {
|
||||
// pass to default
|
||||
}
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ public final class DistributorDirectory extends BaseDirectory {
|
||||
Directory directory = getDirectory(from);
|
||||
if (nameDirMapping.putIfAbsent(to, directory) != null) {
|
||||
throw new IOException("Can't rename file from " + from
|
||||
+ " to: " + to + ": target file already exists");
|
||||
+ " to: " + to + "target file already exists");
|
||||
}
|
||||
boolean success = false;
|
||||
try {
|
||||
|
@ -24,7 +24,6 @@ import java.io.IOException;
|
||||
import org.apache.lucene.store.BaseDirectoryTestCase;
|
||||
import org.apache.lucene.store.Directory;
|
||||
import org.apache.lucene.store.IOContext;
|
||||
import org.apache.lucene.store.MockDirectoryWrapper;
|
||||
import org.apache.lucene.util.LuceneTestCase;
|
||||
import org.apache.lucene.util.TimeUnits;
|
||||
import org.elasticsearch.index.store.distributor.Distributor;
|
||||
@ -47,10 +46,6 @@ public class DistributorDirectoryTest extends BaseDirectoryTestCase {
|
||||
Directory[] directories = new Directory[1 + random().nextInt(5)];
|
||||
for (int i = 0; i < directories.length; i++) {
|
||||
directories[i] = newDirectory();
|
||||
if (directories[i] instanceof MockDirectoryWrapper) {
|
||||
// TODO: fix this test to handle virus checker
|
||||
((MockDirectoryWrapper) directories[i]).setEnableVirusScanner(false);
|
||||
}
|
||||
}
|
||||
return new DistributorDirectory(directories);
|
||||
}
|
||||
|
@ -514,8 +514,6 @@ public class StoreTest extends ElasticsearchLuceneTestCase {
|
||||
dirs[i] = newDirectory(random);
|
||||
if (dirs[i] instanceof MockDirectoryWrapper) {
|
||||
((MockDirectoryWrapper)dirs[i]).setPreventDoubleWrite(preventDoubleWrite);
|
||||
// TODO: fix this test to handle virus checker
|
||||
((MockDirectoryWrapper)dirs[i]).setEnableVirusScanner(false);
|
||||
}
|
||||
}
|
||||
this.random = random;
|
||||
|
@ -85,8 +85,6 @@ public class MockDirectoryHelper {
|
||||
w.setThrottling(throttle);
|
||||
w.setCheckIndexOnClose(false); // we do this on the index level
|
||||
w.setPreventDoubleWrite(preventDoubleWrite);
|
||||
// TODO: make this test robust to virus scanner
|
||||
w.setEnableVirusScanner(false);
|
||||
w.setNoDeleteOpenFile(noDeleteOpenFile);
|
||||
wrappers.add(w);
|
||||
return w;
|
||||
|
Loading…
x
Reference in New Issue
Block a user