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

[jira] [Updated] (SOLR-15858) ConfigSetsHandler requires DIR entries in the uploaded ZIPs

     [ https://issues.apache.org/jira/browse/SOLR-15858?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrzej Bialecki updated SOLR-15858:
------------------------------------
    Description: 
If you try uploading a configset zip that contains resources in sub-folders - but doesn't contain explicit DIR entries in the zip file - the upload will fail with {{{}NoNodeException{}}}.

This is caused by {{ConfigSetsHandler.createZkNodeIfNotExistsAndSetData}} which assumes the entry path doesn't contain sub-path elements. If the corresponding DIR entries are present (and they occur earlier in the zip than their child resource entries!) the handler will work properly because it recognizes DIR entries and creates ZK paths as needed.

The fix would be to always check for the presence of `/` characters in the entry name and make sure the ZK path already exists.

  was:
If you try uploading a configset zip that contains resources in sub-folders - but doesn't contain explicit DIR entries in the zip file - the upload will fail with `NoNodeException`.

This is caused by `ConfigSetsHandler.createZkNodeIfNotExistsAndSetData` which assumes the entry path doesn't contain sub-path elements. If the corresponding DIR entries are present (and they occur earlier in the zip than their child resource entries!) the handler will work properly because it recognizes DIR entries and creates ZK paths as needed.

The fix would be to always check for the presence of `/` characters in the entry name and make sure the ZK path already exists.


> ConfigSetsHandler requires DIR entries in the uploaded ZIPs
> -----------------------------------------------------------
>
>                 Key: SOLR-15858
>                 URL: https://issues.apache.org/jira/browse/SOLR-15858
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: configset-api
>    Affects Versions: 8.11.1
>            Reporter: Andrzej Bialecki
>            Priority: Major
>
> If you try uploading a configset zip that contains resources in sub-folders - but doesn't contain explicit DIR entries in the zip file - the upload will fail with {{{}NoNodeException{}}}.
> This is caused by {{ConfigSetsHandler.createZkNodeIfNotExistsAndSetData}} which assumes the entry path doesn't contain sub-path elements. If the corresponding DIR entries are present (and they occur earlier in the zip than their child resource entries!) the handler will work properly because it recognizes DIR entries and creates ZK paths as needed.
> The fix would be to always check for the presence of `/` characters in the entry name and make sure the ZK path already exists.



--
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