You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org> on 2009/02/03 21:03:59 UTC

[jira] Commented: (SOLR-658) Allow Solr to load index from arbitrary directory in dataDir

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

Shalin Shekhar Mangar commented on SOLR-658:
--------------------------------------------

Copying over from the solr-dev thread on failing tests:

The first problem is that File.equals compares only the path and not the absolute path. A work around is to compare absolute path ourselves. But a bigger problem is with the canonical paths where long directory names is uppercased and shortened into 8 character names (e.g. "C:\Documents and Settings" becomes "C:\DOCUME~1").

The test fails because we use java.io.tmpdir which defaults to user's home directory (shortened and canonicalized) on windows and comparison on this path fails. What I'm not able to figure out yet is why does Slave Jetty, running on this canonical path, returns the full path of the index directory.

Slave's SolrCore.getIndexDir gives:
C:\Documents and Settings\shalinsmangar\Local Settings\Temp\org.apache.solr.handler.TestReplicationHandler$SolrInstance-1233681533000master\data\index

The value written by TestReplicationHandler is:
C:\DOCUME~1\SHALIN~1\LOCALS~1\Temp\org.apache.solr.handler.TestReplicationHandler$SolrInstance-1233681533000master\data\index


> Allow Solr to load index from arbitrary directory in dataDir
> ------------------------------------------------------------
>
>                 Key: SOLR-658
>                 URL: https://issues.apache.org/jira/browse/SOLR-658
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.4
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>             Fix For: 1.4
>
>         Attachments: SOLR-658.patch, SOLR-658.patch, SOLR-658.patch, SOLR-658.patch, SOLR-658.patch, SOLR-658.patch
>
>
> This is a requirement for java based Solr replication 
> Usecase for arbitrary index directory:
> if the slave has a corrupted index and the filesystem does not allow overwriting files in use (NTFS) replication will fail. The solution is to copy the index from master to an alternate directory on slave and load indexreader/indexwriter from this alternate directory.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.