lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Hunt (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SOLR-3921) CoreAdminHandler fails when dataDir doesn't exist on local filesystem
Date Mon, 08 Oct 2012 18:52:02 GMT

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

Patrick Hunt updated SOLR-3921:
-------------------------------

    Attachment: SOLR-3921.patch

This patch works around the problem by returning 0 when the directory doesn't exist. Note
that ReplicationHandler has the same issue.

Seems that the proper way to handle this would be to move the size calculation into SolrCore
class and use Directory instead of local filesystem. I'm not sure what that entails, this
patch is a workaround where proper fix would require a more involved solution. Should I enter
a jira for that? (ie move the calculation into solrcore and use Directory instead of local
filesystem).

I looked at adding unit tests for this however it wasn't clear how I might do that. I don't
see that this is currently tested, and there didn't seem to be a way to use EasyMock for this.
If there are any suggestions on how to add unit tests for this please comment. (if you feel
such is necessary)

I manually verified by using a RAMDirectoryFactory and then deleting the data directory after
the server was started (the directory would be re-created on solr server startup). The UI
functions properly with this patch - although the reported size is incorrect (zero). The Directory
based approach I mentioned earlier would be necessary to address this.

                
> CoreAdminHandler fails when dataDir doesn't exist on local filesystem
> ---------------------------------------------------------------------
>
>                 Key: SOLR-3921
>                 URL: https://issues.apache.org/jira/browse/SOLR-3921
>             Project: Solr
>          Issue Type: Bug
>          Components: web gui
>    Affects Versions: 4.0-BETA
>            Reporter: Patrick Hunt
>            Assignee: Patrick Hunt
>            Priority: Critical
>             Fix For: 4.1, 5.0
>
>         Attachments: SOLR-3921.patch
>
>
> CoreAdminHandler.getIndexSize calls FileUtils.sizeOfDirectory which throws unhandled
IllegalArgumentException when dataDir doesn't exist on the local filesystem. As a result the
webapp gui "hangs" (never displays any result).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message