elasticsearch/elasticsearch — pull request #7792 by s1monw (2014-09-18 22:38:09+00:00)
Title: [ENGINE] try increment store before searcher is acquired

InternalEngine#refreshNeeded must increment the ref count on the
store used before it's checking if the searcher is current since
internally a searcher ref is acquired and if that happens concurrently
to a engine close it might violate the assumption that all files
are closed when the store is closed.

This commit also converts some try / finally into try / with.