Is Azure Storage blob UploadText method atomic?

126 views Asked by At

In a use case of mine, I am periodically overwriting a storage blob with UploadText method and also the same blob is being read in parallel. I have the below doubts:

  1. Will the blob's LastModified time be updated before the UploadText method has written the complete data?
  2. Can the data be partially exposed to any reader that is trying to read the blob content while UploadText is overwriting the same blob?
1

There are 1 answers

1
Ivan Glasenberg On BEST ANSWER

For Q1: No, the LastModified time will be updated until blob is committed(before that, it's in uncommitted state).

For Q2: while overwriting, since the new content is in uncommitted state, at this time, only the old content(the content before update) can be read.