We've observed an issue in SharedIndexWorkspaceImpl that appears to be a bug.
Due to the nature of the bug (requires running two separate jvms) creating a test case would be difficult, however it is pretty simple to reason through.
The openWritersUsers is incremented before an IndexWriter is successfully obtained.
We are seeing a scenario with two separate jvms writing to the same index where one process holds a lock long enough to cause a locktimeout and the second process fails to obtain an IndexWriter (yet it still increments the openWritersUsers). Subsequent writes from the second process create a lock which is never closed due to openWriterUsers being > 0.
hibernate-search 4.2.0.Final, any db