On Fri, Jan 30, 2009 at 6:31 PM, Yonik Seeley <ysee...@gmail.com> wrote:
> > Yonik, can you give more details on this bug? > > This line isn't true when another searcher is open... they are > equivalent, but not equal (canonical paths and all that i guess): > if(new File(getIndexDir()).equals(new File(newIndexDir))) { > 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 lowercased 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 -- Regards, Shalin Shekhar Mangar.