mirror of
https://github.com/apache/lucene.git
synced 2025-02-08 02:58:58 +00:00
SOLR-3641: CoreContainer is not persisting roles core attribute.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1384952 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2897f002cb
commit
ff7c8d0217
@ -215,6 +215,9 @@ Bug Fixes
|
|||||||
* SOLR-3813: When a new leader syncs, we need to ask all shards to sync back,
|
* SOLR-3813: When a new leader syncs, we need to ask all shards to sync back,
|
||||||
not just those that are active. (Mark Miller)
|
not just those that are active. (Mark Miller)
|
||||||
|
|
||||||
|
* SOLR-3641: CoreContainer is not persisting roles core attribute.
|
||||||
|
(hossman, Mark Miller)
|
||||||
|
|
||||||
Other Changes
|
Other Changes
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
@ -92,6 +92,7 @@ import org.xml.sax.SAXException;
|
|||||||
*/
|
*/
|
||||||
public class CoreContainer
|
public class CoreContainer
|
||||||
{
|
{
|
||||||
|
private static final String LEADER_VOTE_WAIT = "180000"; // 3 minutes
|
||||||
private static final String DEFAULT_HOST_CONTEXT = "solr";
|
private static final String DEFAULT_HOST_CONTEXT = "solr";
|
||||||
private static final String DEFAULT_HOST_PORT = "8983";
|
private static final String DEFAULT_HOST_PORT = "8983";
|
||||||
private static final int DEFAULT_ZK_CLIENT_TIMEOUT = 15000;
|
private static final int DEFAULT_ZK_CLIENT_TIMEOUT = 15000;
|
||||||
@ -461,7 +462,7 @@ public class CoreContainer
|
|||||||
hostContext = cfg.get("solr/cores/@hostContext", DEFAULT_HOST_CONTEXT);
|
hostContext = cfg.get("solr/cores/@hostContext", DEFAULT_HOST_CONTEXT);
|
||||||
host = cfg.get("solr/cores/@host", null);
|
host = cfg.get("solr/cores/@host", null);
|
||||||
|
|
||||||
leaderVoteWait = cfg.get("solr/cores/@leaderVoteWait", "180000"); // 3 minutes
|
leaderVoteWait = cfg.get("solr/cores/@leaderVoteWait", LEADER_VOTE_WAIT);
|
||||||
|
|
||||||
if(shareSchema){
|
if(shareSchema){
|
||||||
indexSchemaCache = new ConcurrentHashMap<String ,IndexSchema>();
|
indexSchemaCache = new ConcurrentHashMap<String ,IndexSchema>();
|
||||||
@ -1246,6 +1247,7 @@ public class CoreContainer
|
|||||||
intToString(this.zkClientTimeout),
|
intToString(this.zkClientTimeout),
|
||||||
Integer.toString(DEFAULT_ZK_CLIENT_TIMEOUT));
|
Integer.toString(DEFAULT_ZK_CLIENT_TIMEOUT));
|
||||||
addCoresAttrib(coresAttribs, "hostContext", this.hostContext, DEFAULT_HOST_CONTEXT);
|
addCoresAttrib(coresAttribs, "hostContext", this.hostContext, DEFAULT_HOST_CONTEXT);
|
||||||
|
addCoresAttrib(coresAttribs, "leaderVoteWait", this.leaderVoteWait, LEADER_VOTE_WAIT);
|
||||||
|
|
||||||
List<SolrCoreXMLDef> solrCoreXMLDefs = new ArrayList<SolrCoreXMLDef>();
|
List<SolrCoreXMLDef> solrCoreXMLDefs = new ArrayList<SolrCoreXMLDef>();
|
||||||
|
|
||||||
@ -1318,11 +1320,15 @@ public class CoreContainer
|
|||||||
|
|
||||||
CloudDescriptor cd = dcore.getCloudDescriptor();
|
CloudDescriptor cd = dcore.getCloudDescriptor();
|
||||||
String shard = null;
|
String shard = null;
|
||||||
|
String roles = null;
|
||||||
if (cd != null) {
|
if (cd != null) {
|
||||||
shard = cd.getShardId();
|
shard = cd.getShardId();
|
||||||
|
roles = cd.getRoles();
|
||||||
}
|
}
|
||||||
addCoreProperty(coreAttribs, coreNode, CORE_SHARD, shard, null);
|
addCoreProperty(coreAttribs, coreNode, CORE_SHARD, shard, null);
|
||||||
|
|
||||||
|
addCoreProperty(coreAttribs, coreNode, CORE_ROLES, roles, null);
|
||||||
|
|
||||||
String collection = null;
|
String collection = null;
|
||||||
// only write out the collection name if it's not the default (the
|
// only write out the collection name if it's not the default (the
|
||||||
// core
|
// core
|
||||||
|
Loading…
x
Reference in New Issue
Block a user