SOLR-6897: Throw fatal error if nrtMode is present in solrconfig on 6.0. Added note to upgrade section.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1649816 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2015-01-06 14:50:54 +00:00
parent 258f3b152e
commit 75f6dd52e4
4 changed files with 43 additions and 1 deletions

View File

@ -40,6 +40,9 @@ Upgrading from Solr 5.x
* The deprecated SolrServer and subclasses have been removed, use SolrClient
instead.
* The deprecated <nrtMode> configuration in solrconfig.xml has been removed.
Please remove it from solrconfig.xml.
Detailed Change List
----------------------

View File

@ -195,7 +195,7 @@ public class SolrConfig extends Config implements MapSerializable{
}
assertWarnOrFail("The <nrtMode> config has been discontinued and NRT mode is always used by Solr." +
" This config will be removed in future versions.", getNode(indexConfigPrefix + "/nrtMode", false) == null,
false
true
);
// Parse indexConfig section, using mainIndex as backup in case old config is used

View File

@ -0,0 +1,35 @@
<?xml version="1.0" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<config>
<luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<directoryFactory name="DirectoryFactory" class="NRTCachingDirectoryFactory"/>
<!-- BEGIN: BAD -->
<indexConfig>
<nrtMode>false</nrtMode>
</indexConfig>
<!-- END: BAD -->
</config>

View File

@ -27,6 +27,10 @@ public class TestBadConfig extends AbstractBadConfigTestBase {
assertConfigs("bad_solrconfig.xml","schema.xml","unset.sys.property");
}
public void testNRTModeProperty() throws Exception {
assertConfigs("bad-solrconfig-nrtmode.xml","schema.xml", "nrtMode");
}
public void testMultipleDirectoryFactories() throws Exception {
assertConfigs("bad-solrconfig-multiple-dirfactory.xml", "schema12.xml",
"directoryFactory");