[
https://issues.apache.org/jira/browse/LUCENE-5544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shai Erera updated LUCENE-5544:
-------------------------------
Comment: was deleted
(was: Apologies for the multiple comments -- what did you mean by {{// don't
call ensureOpen here: this acts like "close()" in closeable.}}? That the app
can call rollback() multiple times? Because currently it can't, since writeLock
is set to null by the first call and the second call w/ try to sync on a null
instance and hit NPE?)
> exceptions during IW.rollback can leak files and locks
> ------------------------------------------------------
>
> Key: LUCENE-5544
> URL: https://issues.apache.org/jira/browse/LUCENE-5544
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Robert Muir
> Fix For: 4.8, 5.0, 4.7.1
>
> Attachments: LUCENE-5544.patch
>
>
> Today, rollback() doesn't always succeed: if it does, it closes the writer
> nicely. otherwise, if it hits exception, it leaves you with a half-broken
> writer, still potentially holding file handles and write lock.
> This is especially bad if you use Native locks, because you are kind of
> hosed, the static map prevents you from forcefully unlocking (e.g.
> IndexWriter.unlock) so you have no real course of action to try to recover.
> If rollback() hits exception, it should still deliver the exception, but
> release things (e.g. like IOUtils.close).
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]