open-horizon / edge-sync-service

Cloud - Edge synchronization service (MMS)
Apache License 2.0
24 stars 26 forks source link

Deleting an object closely followed by publishing an object fails to delete first object #81

Closed Polber closed 1 year ago

Polber commented 3 years ago

There is a synchronization issue where publishing an object a few seconds after deleting a different object from mms will cause the object undergoing deletion to not be deleted. Both objects will remain in the mms.

Note This problem occurs similarly in reverse order. Deleting an object a few seconds after publishing an object causes the object undergoing deletion to be deleted, but the object being published will not be published. Neither object will be in the mms. Essentially, calling mms publish and mms delete in either order with only a few seconds buffer will result in only the latter of the two commands being fully executed.

Reproducing the error:

  1. Publish an object to mms using hzn mms object publish -m <object-metadata-1> -f <object-file-1>
  2. Run hzn mms object ls -t <objectType-1> -i <objectID-1> to make sure object is stored in mms
  3. Delete the object using hzn mms object del -t <objectType-1> -i <objectID-1>
  4. Wait about 5 seconds
  5. Publish a new object to mms using hzn mms object publish -m <object-metadata-2> -f <object-file-2>
  6. Run hzn mms object ls -t <objectType-2> -i <objectID-2> to make sure object is stored in mms
  7. At this point, any subsequent call to hzn mms object ls should show only the first object