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

Uwe Schindler commented on LUCENE-6507:
---------------------------------------

In any case, it would be nice to get a reference here to the failed 
Elasticsearch test or an example of code broken by this, because it looks like 
Robert and Simon are talking about something completely different, than 
described here in the issue description. To me the issue description is quite 
clear: "Directory#makeLock only creates lock instance but does not lock 
directory."

The bugs in NativeFSLockFactory should please be moved to a new issue, its 
completely unrelated to the current issue. Sorry.

> Directory#makeLock is trappy
> ----------------------------
>
>                 Key: LUCENE-6507
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6507
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Simon Willnauer
>
> the lock API in Lucene is super trappy since the lock that we return form 
> this API must first be obtained and if we can't obtain it the lock should not 
> be closed since we might ie. close the underlying channel in the NativeLock 
> case which releases all lock for this file on some operating systems. I think 
> the makeLock method should try to obtain and only return a lock if we 
> successfully obtained it. Not sure if it's possible everywhere but we should 
> at least make the documentation clear here.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to