ManagedIndexSchema Bad version when trying to persist schema

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

ManagedIndexSchema Bad version when trying to persist schema

Mikhail Ibraheem-3
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
Reply | Threaded
Open this post in threaded view
|

Re: ManagedIndexSchema Bad version when trying to persist schema

Erick Erickson
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
<[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: ManagedIndexSchema Bad version when trying to persist schema

Mikhail Ibraheem-2
 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 <[hidden email]> 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
<[hidden email]> 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  
Reply | Threaded
Open this post in threaded view
|

Re: ManagedIndexSchema Bad version when trying to persist schema

Terry Steichen
In reply to this post by Mikhail Ibraheem-3
Erick,

I don't get any such message when I start solr - could you share what
that curl command should be?

You suggest modifying solrconfig.xml - could you be more explicit on
what changes to make?

Terry


On 10/11/2018 11:52 AM, Erick Erickson 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
> <[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

Re: ManagedIndexSchema Bad version when trying to persist schema

Shawn Heisey-2
In reply to this post by Mikhail Ibraheem-2
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

Reply | Threaded
Open this post in threaded view
|

Re: ManagedIndexSchema Bad version when trying to persist schema

Erick Erickson
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 <[hidden email]> 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
>