You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Bence Szabó (Jira)" <ji...@apache.org> on 2021/12/03 14:04:00 UTC

[jira] [Commented] (SOLR-15830) Concurrent core reload messes up commits when using Schema API

    [ https://issues.apache.org/jira/browse/SOLR-15830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17453026#comment-17453026 ] 

Bence Szabó commented on SOLR-15830:
------------------------------------

I was able to reproduce this bug in many versions with a script which creates a brand new collection and uses these two curl commands:
{code:java}
curl -X POST -H 'Content-Type: application/json' "http://${solr_host}:${solr_port}/solr/${collection_name}/schema" --data-binary @/root/schema
curl -X POST -H 'Content-Type: application/csv' "http://${solr_host}:${solr_port}/solr/${collection_name}/update" --data-binary @/root/movieDetails3.csv {code}
Here movieDetail3.csv is a ~1MB csv document and schema is a json file which starts like: 
{code:java}
"add-field":[{"stored": True, "type": "string", "name": "title", "multiValued": False}, ...{code}
and all the fields found in the csv file are specified afterwards.

After this in many cases I can't see all the documents, and no autocommits are triggered. If I commit manually (for example with curl) all the documents become available.

> Concurrent core reload messes up commits when using Schema API
> --------------------------------------------------------------
>
>                 Key: SOLR-15830
>                 URL: https://issues.apache.org/jira/browse/SOLR-15830
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Bence Szabó
>            Priority: Minor
>
> When using Schema API SchemaManager class triggers a core reload here: [https://github.com/apache/solr/blob/cfc953b6b906ef742bba57024d327fbde5d564c2/solr/core/src/java/org/apache/solr/schema/SchemaManager.java#L132]
> As I understand this was introduced in SOLR-9832 and is useful to avoid accidentally reloading to an older version of the config. The problem is that in the solr core a listener is implemented to initiate a reload whenever a config change happens in ZK, this can be found here: [https://github.com/apache/solr/blob/cfc953b6b906ef742bba57024d327fbde5d564c2/solr/core/src/java/org/apache/solr/core/SolrCore.java#L3140]
> When updating the schema using the Schema API both of these reloads get triggered and this can result a strange bug, where not all the indexed documents are visible if the indexing is started just after the schema API returned.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org