You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/05/30 03:10:04 UTC

[jira] [Commented] (SOLR-10719) Creating a core.properties fails if the parent of core.properties is a symlinked dierctory

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

ASF subversion and git services commented on SOLR-10719:
--------------------------------------------------------

Commit 412e4ae2c192a5b444dd63220e5918f4e7fd47be in lucene-solr's branch refs/heads/master from [~erickerickson]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=412e4ae ]

SOLR-10719: Creating a core.properties fails if the parent of core.properties is a symlinked dierctory


> Creating a core.properties fails if the parent of core.properties is a symlinked dierctory
> ------------------------------------------------------------------------------------------
>
>                 Key: SOLR-10719
>                 URL: https://issues.apache.org/jira/browse/SOLR-10719
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Erick Erickson
>            Assignee: Erick Erickson
>         Attachments: SOLR-10719.patch
>
>
> Well, it doesn't actually fail until you try to restart the Solr instance. The root is that creating core.properties fails.
> This is due to SOLR-8260. CorePropertiesLocator.writePropertiesFile changed from:
> propfile.getParentFile().mkdirs();
> to
> Files.createDirectories(propfile.getParent());
> The former (apparently) thinks it's OK if a symlink points to a directory, but the latter throws an exception.
> So the behavior here is that the call appears to succeed, the replica is created and is functional. Until you restart the instance when it's not discovered.
> I hacked in a simple test to see if the parent existed already and skip the call to createDirectories if so and ADDREPLICA works just fine. Restarting Solr finds the replica.
> The test "for real" would probably have to be better than this as we probably really want to keep from overwriting an existing replica and the like, didn't check whether that's already accounted for though.
> There's another issue here that failing to write the properties file should fail the ADDREPLICA IMO.
> [~romseygeek] I'm guessing that this is an unintended side-effect of SOLR-8260 but wanted to check before diving in deeper.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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