Re: Broker computes message crcs twice

2012-09-14 Thread Jun Rao
Yes, we should remove the crc check in the iterator of ByteBufferMessageSet. Log.append already checks crc, which protects the server. Consumer, if wants to, could explicitly check the crc on each message on its own. Thanks, Jun On Fri, Sep 14, 2012 at 9:19 AM, Jay Kreps wrote: > Okay, I check

Re: Broker computes message crcs twice

2012-09-14 Thread Jay Kreps
Okay, I checked on this. The producer computes the checksum twice, which is once too many. The server computes the checksum an astounding 39 times in 0.8 branch! I think this answers the earlier questions: The right thing to do is clearly to remove the check from the iterator as people are iteratin

Re: Broker computes message crcs twice

2012-09-14 Thread Jay Kreps
I actually think the validBytes() call is looping and hence computing CRCs too. So actually at least three times. -Jay On Fri, Sep 14, 2012 at 9:10 AM, Jay Kreps wrote: > Hey guys, > > I noticed that our ByteBufferMessageSet iterator computes the message CRC > on iteration. Log.append also loop