----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/26346/#review55479 -----------------------------------------------------------
Thanks for the patch. Some comments below. core/src/main/scala/kafka/log/Log.scala <https://reviews.apache.org/r/26346/#comment95851> This probably should be moved to before line 285 since validMessages may change before we do the append. core/src/main/scala/kafka/log/Log.scala <https://reviews.apache.org/r/26346/#comment95850> Would it be simpler to just do the following? if (segment.size + messageSize < (long) config.segmentSize) core/src/test/scala/unit/kafka/log/LogTest.scala <https://reviews.apache.org/r/26346/#comment95849> Appending 2GB of data in a unit test is probably too long. We can probably just manually validate the fix and skip the unit test. - Jun Rao On Oct. 5, 2014, 3:17 a.m., Sriharsha Chintalapani wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/26346/ > ----------------------------------------------------------- > > (Updated Oct. 5, 2014, 3:17 a.m.) > > > Review request for kafka. > > > Bugs: KAFKA-1670 > https://issues.apache.org/jira/browse/KAFKA-1670 > > > Repository: kafka > > > Description > ------- > > KAFKA-1670. Corrupt log files for segment.bytes values close to Int.MaxInt. > > > Diffs > ----- > > core/src/main/scala/kafka/log/Log.scala > 0ddf97bd30311b6039e19abade41d2fbbad2f59b > core/src/test/scala/unit/kafka/log/LogTest.scala > 577d102fc2eb6bb1a72326141ecd431db6d66f04 > > Diff: https://reviews.apache.org/r/26346/diff/ > > > Testing > ------- > > > Thanks, > > Sriharsha Chintalapani > >