You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Dan Smith <ds...@pivotal.io> on 2015/08/25 22:19:41 UTC

Review Request 37769: Fixing failure from RegionDirectoryJUnitTest.testCopyBytesWithThreads

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37769/
-----------------------------------------------------------

Review request for geode, Ashvin A and xiaojian zhou.


Repository: geode


Description
-------

The underlying issue was that the FileIndexInputClass extended
BufferedIndexInput, which looks like has an issue in the clone method.
In FileIndexInput.clone. We were cloning the input stream to start
at the position that it left off (which I think is correct), but the
BufferedIndexInput.clone dropped the buffer, so the next read would miss
some of the bytes that where in that buffer.

After some thought, I don't think we want the BufferedIndexInput because
the data is already stored in memory in a byte array in FileInputStream.
So I removed the dependency on BufferedIndexInput. As part of that work,
I added seek() to the FileInputStream to make seek operations more
efficient.


Diffs
-----

  gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/FileIndexInput.java PRE-CREATION 
  gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/RegionDirectory.java 903eb446dc4b598c04a00f565b9bbdbfdd6f0c18 
  gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/File.java 388e4690c48833063050b4a303597d3f5a202c82 
  gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileInputStream.java 5304a55db09b7ae22a2e95c8703e299d9210a55f 
  gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileOutputStream.java e7f84c3902ccde545648315105657c9c38bb5cc0 
  gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystem.java ef69322c27baaa1efc8308e413372e4064ff5a6a 
  gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/SeekableInputStream.java PRE-CREATION 
  gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/RegionDirectoryJUnitTest.java 8908a4a72ea06f96549d493bae64c8657a91ae8f 
  gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystemJUnitTest.java f29236a4fe9ef925322b44785a3c029df82bfeb6 

Diff: https://reviews.apache.org/r/37769/diff/


Testing
-------


Thanks,

Dan Smith