Closed yxiang92128 closed 4 years ago
@yxiang92128 How about just ignore those uncommitted blocks if the user changes his mind? Those uncommitted will be garbage collected in the future. See this section for more details about blocks.
@yxiang92128 The uncommitted blob won't appear as 0-sized blob when listing blobs, unless you specify uncommittedblobbs
.
As a workaround, I think you can call delete_blob
to delete all uncommitted blocks. As long as there are any uncommitted blocks for this blob, no matter the blob itself exists or not, this function won't throw exception.
got it and delete_blob did the trick.
@JinmingHu-MSFT
Hi, I have another very subtle edge case for you wrt to upload_block and upload_block_list. For an non-existing blob,
The use case is that the user can unwind and then insert new blocks until they decide to upload the finalized list later on. But in between, the new blob should not exist otherwise the application would fail with that empty blob.
Any idea how to work around that, ie, mark the blocks as "deleted" from the "uncommitted" state?
Thanks,
Yang