v6d icon indicating copy to clipboard operation
v6d copied to clipboard

If the object is deleted when the client migrates it, the client will read the invalid value

Open vegetableysm opened this issue 1 year ago • 0 comments

Describe your problem

As tittled, example:

  1. IPCClient create a object (object id is id1)
  2. RPCClient get object with id1, and get blob with object meta
  3. RPCClient call getRemoteBlob to get blob
  4. Before Vineyardd send blob data, vineyard sleep 5 second.
  5. IPCClient call delData to delete the object and create a new object with new data
  6. Vineyard wakes, and sends buffer.
  7. 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} image 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

vegetableysm avatar Jun 24 '24 08:06 vegetableysm