when a request cause a sds object list into the clients' reply list ,and increase the ref count , what if someone modify this sds object when sending is in progress? (i mean sending may be interupt and had to split to send multiple times) ,isn't that would cause client to see the weird result that combine the old and current result ? or there is some details i overlooked ?
Comment From: zhihao1996
i would really appreciate if someone help me , i try to find something in the source code ,but haven't found any , i did not find the set command be declined because some client is sending the exact same object
Comment From: oranagra
sds doesn't have a refcount, the strings in the reply buffer are copies, not references to any data used elsewhere. IIRC, before redis 4.0 the reply buffers were robj with refcount and a copy on write mechanism. in 4.0 it was changed to sds objects which stand on their own. and in 5.0 it was changed to just buffers of 16k (not even sds objects)