Patch looks good.
I'll try to make a test for the case described and prepare a PR.
On Mon, Apr 9, 2018 at 11:58 AM, Vladimir Ozerov <voze...@gridgain.com>
> Hi Andrey,
> I know you helped to migrate AI to newer Lucene version. Could you please
> take a look at the patch?
> On Fri, Apr 6, 2018 at 12:02 PM, Manu <maxn...@hotmail.com> wrote:
>> GridLuceneOutputStream has a bug on copyBytes method and
>> GridLuceneInputStream on readBytes method for direct calls from
>> GridLuceneOutputStream, since version in which ignite was updated to
>> since commit 478d3b5d3361c3d74d0da4b6a78e9944d8b95630
>> IGNITE-3562: Updated Lucene dependency to version 5.5.2. This closes
>> On both methods internal GridLuceneOutputStream's CRC is not updated, so
>> get /org.apache.lucene.index.CorruptIndexException: checksum failed
>> (hardware problem?) [...]/ when the use of lucene internally try to merge
>> To reproduce:
>> 1 - Create a cache with a query entity with at least one @QueryTextField
>> String field
>> 2 - Insert data (for example 50kb aleatory string, bigger string make
>> sooner) on cache (put or by stream) with a loop
>> 3 - waits (no more than 1 minute, depends on your computer) until lucene
>> to internal merge index
>> Suggested patch to fix CorruptIndexException on GridLuceneIndex
>> Hope it helps!!
>> Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/