> On Oct. 5, 2014, 11:35 p.m., Jun Rao wrote: > > core/src/main/scala/kafka/log/Log.scala, line 499 > > <https://reviews.apache.org/r/26346/diff/2/?file=713902#file713902line499> > > > > Would it be simpler to just do the following? > > > > if (segment.size + messageSize < (long) config.segmentSize)
that would cause it roll everytime a message batch is appended . Lets say the segment.size is 10 and messagesSize is 10 and config.segmentSize is 2147483647 the above check will pass and roll the current segment without reaching the config.segmentSize. - Sriharsha ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/26346/#review55479 ----------------------------------------------------------- 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 > >