none
.Net SDK (Blob Storage) AppendText Signature

    Question

  • Hi!

    When appending a blob using the REST-API for the Append Blog (https://msdn.microsoft.com/en-us/library/azure/mt427365.aspx ) I will get an 409 HTTP Error according the documentation (If you attempt to upload more than 50,000 blocks, the service returns the BlockCountExceedsLimit error (HTTP status code 409 – Conflict).)

    When taking a look at the AppendText function (https://msdn.microsoft.com/en-us/library/microsoft.windowsazure.storage.blob.cloudappendblob.appendtext.aspx) of the .Net SDK it does neither return a value nor throw a Exception if I reach the 50,000 blocks limit.  How is it possible to recognice that my append failed? Did I miss something here?

    Regards

    Wolfgang

    Tuesday, February 23, 2016 10:18 AM

All replies

  • Hi Wolfgang,

    The AppendText API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.
    So it would not throw any error to indicate that an append failed in a Multi-writer scenario if you reach the 50000 blocks limit.

    Regards,
    Malar.

    Wednesday, February 24, 2016 9:21 AM
  • Hi Malar

    Maybe I misunderstood your answer.

    I do understand that the function is not made for Multi-writer scenarios (appending parallel), that make sense!

    But let’s assume I’ve a single write scenario, and I append something to the blob form time to time. When I got your answer right if I exceed the 50,000 my append function basically silently fails.  That’s somehow unexpected!

    Regards

    Wolfgang

    Thursday, February 25, 2016 2:33 PM