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

Michael McCandless commented on LUCENE-6508:
--------------------------------------------

I love the "changed by an external force" exception!

Nice javadocs catch about now anciently wrong "IndexReader holding a write 
lock"!

I wonder if we even need to pass a lock name anymore?  Maybe it can
just be Directory.obtainWriteLock()?

I love how you implemented the lock timeout (wrapping with a sleeper,
with awesome "This is not a good idea." javadocs) but I really think
we should just remove the timeout: I don't see a valid use case
... but we can do this separately.

The new BaseLockFactoryTestCase refactoring is awesome.

I also love the LockValidatingDirectoryWrapper approach; hopefully the
additional IO ops per desctructive op is not too costly on
indexing/NRT reopen latency.


> Simplify Directory/lock api
> ---------------------------
>
>                 Key: LUCENE-6508
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6508
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>            Assignee: Uwe Schindler
>         Attachments: LUCENE-6508-deadcode1.patch, LUCENE-6508.patch, 
> LUCENE-6508.patch
>
>
> See LUCENE-6507 for some background. In general it would be great if you can 
> just acquire an immutable lock (or you get a failure) and then you close that 
> to release it.
> Today the API might be too much for what is needed by IW.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to