NightOwl888 commented on PR #746:
URL: https://github.com/apache/lucenenet/pull/746#issuecomment-1305623001

   > ## `FSDirectory`
   > There's a commented `base.Disposing(disposed)` change in `FSDirectory` 
which when activated causes at least 140 tests to fail (I didn't run it all the 
way through when I noticed the error). Please validate that the `Dispose(bool)` 
method isn't supposed to call its base.
   
   I took a look and the only thing that `BufferedIndexOutput` does in its 
`Dispose(bool)` method is call `Flush()`. There is a comment at the top of 
`FSIndexOutput` that give some insight:
   
   ```c#
   // LUCENENET specific: Since FileStream does its own buffering, this class 
was refactored
   // to do all checksum operations as well as writing to the FileStream. By 
doing this we elminate
   // the extra set of buffers that were only creating unnecessary memory 
allocations and copy operations.
   ```
   
   So, the inheritance chain was left unchanged (for consistency with Lucene), 
but we aren't actually using the functionality of the base class. Instead, we 
call `Flush()` on `FileStream` and dispose it.
   
   The `BufferedIndexOutput` class doesn't actually have any `IDisposable` 
objects in it.
   
   This looks fine.


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

To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to