简体   繁体   English

Azure 存储 blob UploadText 方法是原子的吗?

[英]Is Azure Storage blob UploadText method atomic?

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.在我的一个用例中,我定期使用UploadText方法覆盖存储 blob,并且正在并行读取相同的 blob。 I have the below doubts:我有以下疑问:

  1. Will the blob's LastModified time be updated before the UploadText method has written the complete data?在 UploadText 方法写入完整数据之前,blob 的LastModified时间是否会更新?
  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?当 UploadText 覆盖同一个 blob 时,是否可以将数据部分暴露给任何试图读取 blob 内容的读取器?

For Q1: No, the LastModified time will be updated until blob is committed(before that, it's in uncommitted state).对于 Q1:否,LastModified 时间将更新,直到 blob 被提交(在此之前,它处于未提交状态)。

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. Q2:覆盖时,由于新内容处于未提交状态,此时只能读取旧内容(更新前的内容)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM