lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] Created: (LUCENE-1347) IndexWriter.rollback can hang if a previous call hit an exception
Date Wed, 30 Jul 2008 12:47:31 GMT
IndexWriter.rollback can hang if a previous call hit an exception
-----------------------------------------------------------------

                 Key: LUCENE-1347
                 URL: https://issues.apache.org/jira/browse/LUCENE-1347
             Project: Lucene - Java
          Issue Type: Bug
          Components: Index
    Affects Versions: 2.3.1, 2.3
            Reporter: Michael McCandless
            Assignee: Michael McCandless
            Priority: Minor
             Fix For: 2.3.2, 2.4


IW.rollback has logic to make sure only one thread actually gets to do
the rollback whenever multiple threads are calling it at the same
time, by setting the "boolean closing" to true in the thread that got
there first.

Other threads wait for that variable to become false again before
returning from abort.

But, we are not restoring closing to false in a try/finally in
rollback(), which means on hitting an exception in rollback, a
subsequent call to rollback() will hang forever.

close() has the same logic, but there is already a try/finally there
to restore closing to false on exception.

The fix is straightforward.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message