> On April 24, 2014, 12:44 a.m., Jun Rao wrote: > > core/src/main/scala/kafka/log/Log.scala, lines 275-276 > > <https://reviews.apache.org/r/20616/diff/4/?file=566280#file566280line275> > > > > We probably should use validMessages here.
I actually thought about this. The thing is that the bytes that gets trimmed is not recorded anywhere. So when we reject these messages in the re-check after de-recompression, it would be better to record the whole message bytes just to account those trimmed bytes. > On April 24, 2014, 12:44 a.m., Jun Rao wrote: > > core/src/main/scala/kafka/log/Log.scala, lines 346-347 > > <https://reviews.apache.org/r/20616/diff/4/?file=566280#file566280line346> > > > > This requires computing the checksum and can be expensive. We probably > > should move it to after the message size check. If the message-too-large happens, then at most one checksum computation can be wasted by having this before the size validation (once the exception is thrown, rest of messages will be dropped immediately), but I will move it after the size validation just in case. - Guozhang ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/20616/#review41250 ----------------------------------------------------------- On April 23, 2014, 10:20 p.m., Guozhang Wang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/20616/ > ----------------------------------------------------------- > > (Updated April 23, 2014, 10:20 p.m.) > > > Review request for kafka. > > > Bugs: KAFKA-1409 > https://issues.apache.org/jira/browse/KAFKA-1409 > > > Repository: kafka > > > Description > ------- > > Fix KAFKA-1409: Address Jun's comments round two > > > Diffs > ----- > > core/src/main/scala/kafka/cluster/Partition.scala > c08eab0bc35aa2b0caa0dfc1987b4face4315d3b > core/src/main/scala/kafka/log/Log.scala > 46df8d99d977a3b010a9b9f4698187fa9bfb2498 > core/src/main/scala/kafka/message/MessageSet.scala > a1b5c63b4d9deaa2556427d995c41841838cf581 > core/src/main/scala/kafka/server/KafkaApis.scala > bb0359d933356b8fcc2c8df22ce6ea9cb838d6a2 > core/src/main/scala/kafka/server/KafkaRequestHandler.scala > f11f6e2c82b016f4dd3e92466ae1d2ede19feb30 > > Diff: https://reviews.apache.org/r/20616/diff/ > > > Testing > ------- > > > Thanks, > > Guozhang Wang > >
