v6d
v6d copied to clipboard
If the object is deleted when the client migrates it, the client will read the invalid value
Describe your problem
As tittled, example:
- IPCClient create a object (object id is id1)
- RPCClient get object with id1, and get blob with object meta
- RPCClient call getRemoteBlob to get blob
- Before Vineyardd send blob data, vineyard sleep 5 second.
- IPCClient call delData to delete the object and create a new object with new data
- Vineyard wakes, and sends buffer.
- RPCClient get blob data.
I think the rpc client should get the error status because the object has been deleted. Or vineyardd should refuse to delete the object being migrated during migration. However, rpc client get the new data from vineyardd.
Screen shot
Create object with data {1.0, 7.0, 3.0, 4.0, 2.0} and delete it, then create object with data {11, 23, 34, 45, 56}
Check will failed because rpc client use the old blob id and read new data with {11, 23, 34, 45, 56}
Test code has been pushed at https://github.com/vegetableysm/v6d/tree/test-rpc-with-del