Dear Lucene Developers,
In the source file "SolrXMLSerializer.java", there is a flaw in the code
fragment that is using transferTo.
Original Code
--------------------
long size = fcin.size();
long position = 0;
while (position < size) {
position += fcin.transferTo(position, MB32, fcout);
}
The MB32 (which is the max count needs to be decrement.
See reference: http://stackoverflow.com/questions/7379469
Changed Code
----------------------
while (position < size) {
long count = inChannel.transferTo(position, MB32, fcout);
if (count > 0)
{
position += count;
MB32 -= count;
}
}
Please consider fixing this bug.
Thanks!
--
Warmest Regards,
Fuxiang