[
https://issues.apache.org/jira/browse/SOLR-8131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shalin Shekhar Mangar reopened SOLR-8131:
-----------------------------------------
This has broken the schemaless feature in trunk. An easy way to reproduce is to
create at least 2 shards and index some arbitrary json. The following errors
repeat ad nauseam:
{code}
ERROR - 2015-12-12 14:53:45.526; [c:gettingstarted s:shard1 r:core_node1
x:gettingstarted_shard1_replica1] org.apache.solr.schema.ManagedIndexSchema;
Bad version when trying to persist schema using 0 due to:
org.apache.zookeeper.KeeperException$BadVersionException: KeeperErrorCode =
BadVersion for /configs/gettingstarted/managed-schema
INFO - 2015-12-12 14:53:45.526; [c:gettingstarted s:shard1 r:core_node1
x:gettingstarted_shard1_replica1] org.apache.solr.schema.ManagedIndexSchema;
Failed to persist managed schema at /configs/gettingstarted/managed-schema -
version mismatch
{code}
This indicated that the schema version is not being updated from ZooKeeper. I
found that the watch was not being set because the
ManagedSchemaIndexFactory.inform() was never called. This was because in case
there is no schema factory set in the solrconfig.xml, the
IndexSchemaFactory.buildIndexSchema() created a ManagedIndexSchemaFactory
object directly. This is a SolrCoreAware class and it must be created using the
resource loader so that the inform method can be called automatically.
> Make ManagedIndexSchemaFactory as the default in Solr
> -----------------------------------------------------
>
> Key: SOLR-8131
> URL: https://issues.apache.org/jira/browse/SOLR-8131
> Project: Solr
> Issue Type: Wish
> Components: Data-driven Schema, Schema and Analysis
> Reporter: Shalin Shekhar Mangar
> Assignee: Varun Thacker
> Labels: difficulty-easy, impact-high
> Fix For: Trunk, 5.5
>
> Attachments: SOLR-8131.patch, SOLR-8131.patch, SOLR-8131.patch,
> SOLR-8131.patch, SOLR-8131.patch, SOLR-8131_5x.patch
>
>
> The techproducts and other examples shipped with Solr all use the
> ClassicIndexSchemaFactory which disables all Schema APIs which need to modify
> schema. It'd be nice to be able to support both read/write schema APIs
> without needing to enable data-driven or schema-less mode.
> I propose to change all 5.x examples to explicitly use
> ManagedIndexSchemaFactory and to enable ManagedIndexSchemaFactory by default
> in trunk (6.x).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]