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 2021/02/23 03:10:29 UTC

[GitHub] [lucene-solr] zacharymorn commented on a change in pull request #2404: LUCENE-9639: Add unit tests for SimpleTextVector format

zacharymorn commented on a change in pull request #2404:
URL: https://github.com/apache/lucene-solr/pull/2404#discussion_r580741603



##########
File path: lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextVectorReader.java
##########
@@ -93,22 +94,35 @@
             readState.segmentInfo.name,
             readState.segmentSuffix,
             SimpleTextVectorFormat.VECTOR_EXTENSION);
-    dataIn = readState.directory.openInput(vectorFileName, IOContext.DEFAULT);
+
+    boolean success = false;

Review comment:
       Makes sense. I've extended the try-finally block to contain meta file input as well.

##########
File path: lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90VectorReader.java
##########
@@ -120,6 +120,7 @@ private static IndexInput openDataInput(
 
     String fileName =
         IndexFileNames.segmentFileName(state.segmentInfo.name, state.segmentSuffix, fileExtension);
+    // nocommit should the openInput call be put in try-finally as well for IOException handling?

Review comment:
       Sounds good. I have removed the nocommit.




----------------------------------------------------------------
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



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