@ -111,9 +111,9 @@ class ByteBufferMessageSet(private val buffer: ByteBuffer,
@@ -111,9 +111,9 @@ class ByteBufferMessageSet(private val buffer: ByteBuffer,
if(size<0||topIter.remaining<size){
deepValidByteCount=currValidBytes
if(currValidBytes==0||size<0)
thrownewInvalidMessageSizeException("invalid message size: %d only received bytes: %d "+
" at %d possible causes (1) a single message larger than the fetch size; (2) log corruption "
.format(size,topIter.remaining,currValidBytes))
thrownewInvalidMessageSizeException("invalid message size: "+size+" only received bytes: "+
topIter.remaining+" at "+currValidBytes+"( possible causes (1) a single message larger than "+
"the fetch size; (2) log corruption )")
returnallDone()
}
valmessage=topIter.slice()
@ -126,23 +126,30 @@ class ByteBufferMessageSet(private val buffer: ByteBuffer,
@@ -126,23 +126,30 @@ class ByteBufferMessageSet(private val buffer: ByteBuffer,
logger.debug("Message is uncompressed. Valid byte count = %d".format(currValidBytes))
innerIter=null
currValidBytes+=4+size
if(logger.isTraceEnabled)
logger.trace("currValidBytes = "+currValidBytes)
newMessageAndOffset(newMessage,currValidBytes)
case_=>
if(logger.isDebugEnabled)
logger.debug("Message is compressed. Valid byte count = %d".format(currValidBytes))