hello kefu chai, These two days I carefully considered the pr 17661 and looked the code about bufferlist and I still think the steps of 1-3 is needed. Although the ptr::_off can guarantee bufferlist to be copied/read/decode/write_file rightly, this will lead a bufferlist not clean and will waste memory like the picture in annex. Of course, it's also possible that i am not thinking about it, do you have any suggestions?
Attachment:
buffer.png
Description: PNG image