The IOBufferBlock _end and _start should never be reset to free the buffer 
space. The block itself should be released and a new one allocated to store 
additional information. The buffer block chain can be of arbitrary length, I 
haven't seen anywhere in the code that a max length is presumed. Could you 
point out that code? The IOBufferBlocks are treated as write once, stable 
blocks of memory so they can be passed along without copying the memory as the 
data flows through.

In general would should happen is MIOBuffer::write_avail() should be called and 
that will add a new block (if needed) to the writer block chain (see 
MIOBuffer::write_avail in iocore/eventsystem/P_IOBuffer.h). Unfortunately I 
don't see where that is being done, but we have run 6.2.x in production for 
testing and the TLS works. I'll see what I can find. 

   

Reply via email to