c# - Creating Blob in Azure Blob Storage with the same name simultaneously -


i have task load images blob storage simultaneously. name of blob defined md5 of blob. can happen different threads try load same files different locations.

now need know how block other threads loading same file, if first trying upload such blob.

you can without leasing using optimistic concurrency. basicly set access condition says blob different etags of blobs name. if there indeed blob etag second upload fail.

var access = accesscondition.generateifnonematchcondition("*"); await blobref.uploadfromstreamasync(stream, access, null, null); 

Comments

Popular posts from this blog

java - Unable to make sub reports with Jasper -

sql - The object name contains more than the maximum number of prefixes. The maximum is 2 -

scala - play framework: Modules were resolved with conflicting cross-version suffixes -