You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Mikhail Ibraheem <ar...@yahoo.com.INVALID> on 2018/10/11 14:54:30 UTC
ManagedIndexSchema Bad version when trying to persist schema
Hi,We upgraded to Solr 7.5, we try to ingest to solr using solrJ in concurrent updates (Many threads).We are getting this exception:o.a.s.s.ManagedIndexSchema Bad version when trying to persist schema using 1 due to: org.apache.zookeeper.KeeperException$BadVersionException: KeeperErrorCode = BadVersion for /configs/my-core/managed-schemao.a.s.s.ManagedIndexSchema Failed to persist managed schema at /configs/my-core/managed-schema - version mismatch
Also why solr updates and persists the managed-schema while ingesting data? I see managed-schema shouldn't be affected by data updates.
Thanks
Re: ManagedIndexSchema Bad version when trying to persist schema
Posted by Erick Erickson <er...@gmail.com>.
Bah, I should have said when you create a collection. You get the
following if you create your collection using the default schema:
WARNING: Using _default configset with data driven schema
functionality. NOT RECOMMENDED for production use.
To turn off: bin/solr config -c eoe -p 8982 -action
set-user-property -property update.autoCreateFields -value false
But as Shawn says, if you have add-unknown-fields-to-the-schema
configured in your update processor chain in solrconfig.xml, you're
using schemaless mode.
Best,
Erick
On Thu, Oct 11, 2018 at 9:58 AM Shawn Heisey <ap...@elyograg.org> wrote:
>
> On 10/11/2018 10:07 AM, Mikhail Ibraheem wrote:
> > Hi Erick,Thanks for your reply.No, we aren't using schemaless mode. <schemaFactory/> is not explicitly declared in our solrconfig.xml
>
> Schemaless mode is not turned on by the schemaFactory config element.
>
> The default configurations that Solr ships with have schemaless mode
> enabled. It is handled with an update processor chain named
> add-unknown-fields-to-the-schema. As Erick mentioned, we *STRONGLY*
> recommend that you disable this in production. In version 7.5, you only
> need to change whether that update chain is set to the default chain.
> This can be handled with a property (update.autoCreateFields) but you
> can just also edit solrconfig.xml to change the "default" attribute to
> false.
>
> The exception you're getting is
> org.apache.zookeeper.KeeperException$BadVersionException which comes
> from zookeeper. Can you share the *entire* error? It will likely be a
> few dozen lines in length and may contain multiple "Caused by" sections,
> each with their own stacktrace. With the entire error, we can narrow
> down what part of Solr code is executing when the error happens.
>
> Thanks,
> Shawn
>
Re: ManagedIndexSchema Bad version when trying to persist schema
Posted by Shawn Heisey <ap...@elyograg.org>.
On 10/11/2018 10:07 AM, Mikhail Ibraheem wrote:
> Hi Erick,Thanks for your reply.No, we aren't using schemaless mode. <schemaFactory/> is not explicitly declared in our solrconfig.xml
Schemaless mode is not turned on by the schemaFactory config element.
The default configurations that Solr ships with have schemaless mode
enabled. It is handled with an update processor chain named
add-unknown-fields-to-the-schema. As Erick mentioned, we *STRONGLY*
recommend that you disable this in production. In version 7.5, you only
need to change whether that update chain is set to the default chain.
This can be handled with a property (update.autoCreateFields) but you
can just also edit solrconfig.xml to change the "default" attribute to
false.
The exception you're getting is
org.apache.zookeeper.KeeperException$BadVersionException which comes
from zookeeper. Can you share the *entire* error? It will likely be a
few dozen lines in length and may contain multiple "Caused by" sections,
each with their own stacktrace. With the entire error, we can narrow
down what part of Solr code is executing when the error happens.
Thanks,
Shawn
Re: ManagedIndexSchema Bad version when trying to persist schema
Posted by Chris Hostetter <ho...@fucit.org>.
: Hi Erick,Thanks for your reply.No, we aren't using schemaless
: mode. <schemaFactory/> is not explicitly declared in
: our solrconfig.xmlAlso we have only one replica and one shard.
ManagedIndexSchemaFactory has been the default since 6.0 unless an
explicit schemaFactory is defined...
https://lucene.apache.org/solr/guide/7_5/major-changes-from-solr-5-to-solr-6.html
https://lucene.apache.org/solr/guide/7_5/schema-factory-definition-in-solrconfig.html
-Hoss
http://www.lucidworks.com/
Re: ManagedIndexSchema Bad version when trying to persist schema
Posted by Mikhail Ibraheem <mi...@yahoo.com.INVALID>.
Hi Erick,Thanks for your reply.No, we aren't using schemaless mode. <schemaFactory/> is not explicitly declared in our solrconfig.xmlAlso we have only one replica and one shard.
Any help?
ThanksMikhail
On Thursday, 11 October 2018, 17:53:01 EET, Erick Erickson <er...@gmail.com> wrote:
bq: Also why solr updates and persists the managed-schema while ingesting data?
I'd guess you are using "schemaless mode", which is expressly
recommended _against_ for production systems. See "Schemaless Mode" in
the reference guide.
I'd disable schemaless mode (when you start Solr there should be a
message telling you how to disable it via curl, but I'd modify my
solrconfig.xml file to remove it permanently)
Best,
Erick
On Thu, Oct 11, 2018 at 8:02 AM Mikhail Ibraheem
<ar...@yahoo.com.invalid> wrote:
>
> Hi,We upgraded to Solr 7.5, we try to ingest to solr using solrJ in concurrent updates (Many threads).We are getting this exception:o.a.s.s.ManagedIndexSchema Bad version when trying to persist schema using 1 due to: org.apache.zookeeper.KeeperException$BadVersionException: KeeperErrorCode = BadVersion for /configs/my-core/managed-schemao.a.s.s.ManagedIndexSchema Failed to persist managed schema at /configs/my-core/managed-schema - version mismatch
>
> Also why solr updates and persists the managed-schema while ingesting data? I see managed-schema shouldn't be affected by data updates.
> Thanks
Re: ManagedIndexSchema Bad version when trying to persist schema
Posted by Erick Erickson <er...@gmail.com>.
bq: Also why solr updates and persists the managed-schema while ingesting data?
I'd guess you are using "schemaless mode", which is expressly
recommended _against_ for production systems. See "Schemaless Mode" in
the reference guide.
I'd disable schemaless mode (when you start Solr there should be a
message telling you how to disable it via curl, but I'd modify my
solrconfig.xml file to remove it permanently)
Best,
Erick
On Thu, Oct 11, 2018 at 8:02 AM Mikhail Ibraheem
<ar...@yahoo.com.invalid> wrote:
>
> Hi,We upgraded to Solr 7.5, we try to ingest to solr using solrJ in concurrent updates (Many threads).We are getting this exception:o.a.s.s.ManagedIndexSchema Bad version when trying to persist schema using 1 due to: org.apache.zookeeper.KeeperException$BadVersionException: KeeperErrorCode = BadVersion for /configs/my-core/managed-schemao.a.s.s.ManagedIndexSchema Failed to persist managed schema at /configs/my-core/managed-schema - version mismatch
>
> Also why solr updates and persists the managed-schema while ingesting data? I see managed-schema shouldn't be affected by data updates.
> Thanks