Fix serializedSizeZC() for IOBufQueue "packed" behavior & document
Summary: Recently, IOBufQueue started "packing" smaller IOBufs (i.e. <= 4KB) when serializing. This was helpful to avoid unnecessarily IOBuf chaining. That said, we did not update our serializedSizeZC() functions to emit an accurate memory estimate in the case that we did need to pack the IOBuf data. This changes to pass though the IOBuf size, if under the threshold. Also, add a few basic comments in the Protocol implementations about what serializedSize() means, because it's not entirely obvious to a new user that the results aren't intended to be accurate. And document what "ZC" is intended for. Reviewed By: yfeldblum Differential Revision: D14919060 fbshipit-source-id: 18e9bd0c6b9e40ccd1006cffba36363c6f95ea41
Showing
Please register or sign in to comment