Hello, we've developed a multi threaded app, that opens multiple concurrent connections to box.com, using SFTP NOT the REST API
one of the things these apps do is check for the existence of a directory, and if it doesnt exist they mkdir a new directory (standard ftp type functionality)
Once in a while, to our surprise, we end up with duplicate, identically named directories.
We suspect this is caused by 2 threads/sessions/connections/processes whatever you like to call them, simultaneously checking whether a directory with path x/y/z existst and if not calling mkdir (x/y/z)
I understand that concurrency wise this isnt the best thing to do, but Im surprised that this isnt an atomic operation on box.com i.e. one and only one
This has happened to us twice in testing now. Only thing thats strange in the screenshot shown is one of the 2 directories with the same name is shown as Shared and one as Share, is this a subtle clue something else is happening?
Please sign in to leave a comment.