I have to update a large file stored as Azure blob. This update will take a few seconds and I need to ensure that no other client ever gets the partially updated file.
As described in https://docs.microsoft.com/en-us/azure/storage/common/storage-concurrency it should be easy to lock the file for writing but as far as I understand, other clients will still be able to read the file. I could use read locks but that would mean that only one client can read the file and that's not what I want.
According to Preventing azure blob from being accessed by other service while it's being created it seems that at least new files will be "committed" at the end of an upload but I could not find information what happens when I update an existing file.
So, the question is: What will other clients read during an update (replace) operation?
- Will they read the old file until the new data is committed or
- will they read the partially updated file content?