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

Amrit Sarkar commented on SOLR-13166:
-------------------------------------

Attaching a patch with the following design:

1. SchemaChecksManager: does few hard-coded checks, along with changing 
docValues, indexed, multiValued etc while some documents are already indexed. 
The checks may and may not apply, but an error will be thrown with the user 
with helping/justifying message.
2. SolrConfigChecksManger: does few hard-coded checks for autoCommits and cache 
sizes.

To bypass such checks and execute the command anyway use inline parameter 
*{{force=true}}*.
e.g.
{code}
curl http://localhost:8983/solr/wiki/config?force=true -H 
'Content-type:application/json' -d'
{
  "set-property": {
    "updateHandler.autoCommit.maxTime":15000,
    "updateHandler.autoCommit.openSearcher":false
  }
}'
{code}
{code}
curl -X POST -H 'Content-type:application/json' --data-binary '{
  "replace-field":{
     "name":"id",
     "type":"text_general",
     "stored":false }
}' http://localhost:8983/solr/wiki/schema?force=true
{code}

Requesting feedbacks, any other way we can tackle this issue etc.

> Add smart checks for Config and Schema API in Solr to avoid malicious updates
> -----------------------------------------------------------------------------
>
>                 Key: SOLR-13166
>                 URL: https://issues.apache.org/jira/browse/SOLR-13166
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: config-api, Schema and Analysis
>            Reporter: Amrit Sarkar
>            Priority: Major
>
> While working with Solr, schema and configuration changes without 
> understanding can result in severe node failures, and much effort and time 
> get consumed to fix such situations.
> Few such problematic situations can be:
> * Too many fields in the schema
> * Too many commits: too short auto commit
> * Spellchecker, suggester issues. Build suggester index on startup or on 
> every commit causes memory pressure and latency issues
> -- Schema mess-ups
> * Text field commented out and Solr refuses to reload core
> * Rename field type for unique key or version field
> * Single-valued to multivalued and vice versa
> * Switching between docvalues on/off
> * Changing text to string type because user wanted to facet on a text field
> The intention is to add a layer above Schema and Config API to have some 
> checks and let the end user know the ramifications of the changes he/she 
> intends to do.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to