Hi,
I'm writing a multi-threaded client where I cannot guarantee which thread might attempt to upload a document with the same name to the same folder as another. My original plan was to examine the error message coming back. It worked in certain circumstances, but I'm noticing that if I have a large number of threads hitting the server at the same time, the dispatcher error is different. Some times, I might get something like:
INFO Dispatcher error: An item with the name 'DemoExtract.xlsx' already exists.
But sometimes, I get a more fatal error like this:
INFO Dispatcher error: Could not create a new Document.
My guess is that in the above example, two threads are starting an upload at the same instance of the same file name, and one of them fails out.
I don't suppose there is a cheap trick in the REST API to reserve a document name in a folder so that no other thread can use that name?
What have others done in this scenario? I'm seeing this as an issue with at least two other teams.
-Hugh