You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Steffen Moldenhauer (Jira)" <ji...@apache.org> on 2021/06/15 12:25:00 UTC

[jira] [Commented] (SOLR-15478) Schema Changes are Not Visible after Reuse of ConfigSet

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

Steffen Moldenhauer commented on SOLR-15478:
--------------------------------------------

Different Steps to repeat provided by Jason in the user list without backup/restore: 
 # Start Solr: bin/solr start -c -p 7574 2. Turn on auth (this was necessary for me to create a configset that extended "_default"): bin/solr auth enable -type basicAuth -credentials solr:solrRocks -z localhost:8574 3. Create a config based on "_default": curl -ilk -X GET -u solr:solrRocks "[http://localhost:7574/solr/admin/configs?action=CREATE&name=testconfigset&baseConfigSet=_default]"
 # Create a collection using this configset: curl -ilk -X GET -u solr:solrRocks "[http://localhost:7574/solr/admin/collections?action=CREATE&name=coll1&collection.configName=testconfigset&numShards=1]"
 # Download the configset locally: bin/solr zk downconfig -d downloaded_test_config -n testconfig2 -z localhost:8574 6. Drop a new <field> definition into downloaded_test_config/conf/managed-schema
 # Delete the existing collection: curl -ilk -X GET -u solr:solrRocks "[http://localhost:7574/solr/admin/collections?action=DELETE&name=coll1]"
 # Delete the configset from ZK: curl -ilk -X GET -u solr:solrRocks "[http://localhost:7574/solr/admin/configs?action=DELETE&name=testconfigset]"
 # Create the config from the local copy: bin/solr zk upconfig -d downloaded_test_config -n testconfigset -z localhost:8574 10. Create a new collection with the same name as the previous

collection: curl -ilk -X GET -u solr:solrRocks "[http://localhost:7574/solr/admin/collections?action=CREATE&name=coll1&collection.configName=testconfigset&numShards=1]"
 # List the fields and show that the added field is missing: curl -ilk -X GET -u solr:solrRocks "[http://localhost:7574/solr/coll1/schema/fields]"

 

> Schema Changes are Not Visible after Reuse of ConfigSet
> -------------------------------------------------------
>
>                 Key: SOLR-15478
>                 URL: https://issues.apache.org/jira/browse/SOLR-15478
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Backup/Restore, configset-api
>    Affects Versions: 8.8
>            Reporter: Steffen Moldenhauer
>            Priority: Major
>
> After restoring a backup that reuses a previously existing config set, changes in the schema are not visible in the schema API.
> The changes will become visible only after a server restart.
> *Steps To Repeat*
> start solr server in cloud mode with SOLR_OPTS set to -Dsolr.disableConfigSetsCreateAuthChecks=true -Dsolr.allowPaths=/var/solr_backup
> solr start -c
> For preparation create a config set, collection and backup:
> [http://localhost:8983/solr/admin/configs?action=CREATE&name=testcollection&baseConfigSet=_default]
> [http://localhost:8983/solr/admin/collections?action=CREATE&collection.configName=testcollection&name=testcollection&numShards=1]
> [http://localhost:8983/solr/admin/collections?action=BACKUP&location=/var/solr_backup&name=testcollection_backup&collection=testcollection]
>  
> Check the list of fields with the schema API:
> [http://localhost:8983/solr/testcollection/schema/fields]
> Note the fields listed.
>  
> Simulate a schema change - add a field "test1"to the managed-schema:
> /var/solr_backup/testcollection_backup/zk_backup/configs/testcollection/managed-schema
>     <field name="test1" type="string" indexed="true" stored="true" />
>  
> Delete the collection and config set and restore it from the backup:
> [http://localhost:8983/solr/admin/collections?action=DELETE&name=testcollection]
> [http://localhost:8983/solr/admin/configs?action=DELETE&name=testcollection]
> [http://localhost:8983/solr/admin/collections?action=RESTORE&location=/var/solr_backup&name=testcollection_backup&collection=testcollection]
>  
> Check the list of fields with the schema API again:
> [http://localhost:8983/solr/testcollection/schema/fields]
> The added test1 field is missing.
>  
> The field is immediately visible in 8.6.3 In 8.8.2 a server restart is necessary to see the new field.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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