uschindler commented on pull request #2176:
URL: https://github.com/apache/lucene-solr/pull/2176#issuecomment-753547873


   I fixed the rmeinaing TODOs regarding a safe close of *all* segments, when 
exceptions on `map()` occur. When closing the master IndexInput, we also make 
sure to unmap all segments, although exceptions might occur (e.g. on concurrent 
access, `close()` may fail with IllegalStateException). Those exceptions are 
bubbled up.
   
   As MemorySegment does not implement `Closeable` but the more generic 
`AutoCloseable`, I used  `IOUtils.applyToAll()` with `MemorySegment::close` as 
method reference to the close method (heavy functional interface adaption, ey?)


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

Reply via email to