jpountz commented on a change in pull request #1473: URL: https://github.com/apache/lucene-solr/pull/1473#discussion_r419694045
########## File path: lucene/core/src/java/org/apache/lucene/codecs/blocktree/BlockTreeTermsWriter.java ########## @@ -1060,36 +1052,35 @@ public void close() throws IOException { return; } closed = true; - + + final String metaName = IndexFileNames.segmentFileName(state.segmentInfo.name, state.segmentSuffix, BlockTreeTermsReader.TERMS_META_EXTENSION); boolean success = false; - try { - - final long dirStart = termsOut.getFilePointer(); - final long indexDirStart = indexOut.getFilePointer(); + try (IndexOutput metaOut = state.directory.createOutput(metaName, state.context)) { Review comment: That would work too. I like keeping the index output open for as little time as possible when it doesn't make things worse otherwise. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org