storage
storage copied to clipboard
Container deletion inconsistency
storage.Store.Delete(containerID)andstorage.Store.DeleteContainerare separate implementations and out of sync; I think the two really should share code.- The
Deleteversion removes$middleDir/$id/userdatadirectories, theDeleteContainerremoves all of$middleDir/$id. The latter seems like a mistake — conceptually it interferes withcontainerStorebeing in charge of its own storage.
… actually, deleting the container and deleting the user data interferes either way, because containerStore.Delete removes all of $middleDir/$id, i.e. including the userdata subdirectory.
As long as os.RemoveAll is safe WRT concurrent removal, we can probably get away with that… — but, AFAICS, system.EnsureRemoveAll isn’t safe WRT concurrent removal.