You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/02/24 19:57:46 UTC

[GitHub] [lucene-solr] dnhatn commented on a change in pull request #1274: LUCENE-9164: Prevent IW from closing gracefully if threads are still modifying

dnhatn commented on a change in pull request #1274: LUCENE-9164: Prevent IW from closing gracefully if threads are still modifying
URL: https://github.com/apache/lucene-solr/pull/1274#discussion_r383433653
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
 ##########
 @@ -3132,8 +3139,9 @@ public final long prepareCommit() throws IOException {
    * @return <code>true</code> iff this method flushed at least on segment to disk.
    * @lucene.experimental
    */
+  @SuppressWarnings("try")
   public final boolean flushNextBuffer() throws IOException {
-    try {
+    try (Closeable finalizer = acquireModificationLease()){
 
 Review comment:
   nit: add a space before `{`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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