cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Namespace Lock Contentions

Namespace Lock Contentions

ArtFleck
Explorer | Level 3
Go to solution

Hi all,

I have read the Data Ingress guide and I have some follow up questions about namespace lock contentions:

1) Is the lock set through the entire write operation (e.g. If I am uploading a file to a folder, is the lock set on the folder's namespace untill the end of the upload). I have tried to invite/remove members from a folder while uploading a file and I have not encountered the too_many_write_operations exception, even though I expected I would.
2) Do the API's /create_folder and /share_folder (used to create a shared folder) set namespace locks?
3) Is there a way to check for a namespace lock prior to a write action/operation, or is retrying it using the information from Retry_After header the best practice in handling lock contentions?

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

1) We don't have documentation or make guarantees as to when exactly during the lifecycle of an API call the locks are taken. It might be the case, for example, that the lock is only taken at the end of the upload, once all of the data has been transmitted. That's not officially guaranteed though, so I can't recommend relying on that. (Also, adding/removing members from an existing shared folder doesn't change the contents of the folder, or the folder itself, so you may not run in to contention with that in particular anyway.)

 

2) Yes, in general, anything that's making a change to the contents of a namespace (or the namespace's folder itself) is likely to be taking a lock for that namespace.

 

3) No, there isn't a way to proactively check for a current namespace lock. You'll need to catch the exception and retry as you mentioned.

View solution in original post

1 Reply 1

Greg-DB
Dropbox Staff
Go to solution

1) We don't have documentation or make guarantees as to when exactly during the lifecycle of an API call the locks are taken. It might be the case, for example, that the lock is only taken at the end of the upload, once all of the data has been transmitted. That's not officially guaranteed though, so I can't recommend relying on that. (Also, adding/removing members from an existing shared folder doesn't change the contents of the folder, or the folder itself, so you may not run in to contention with that in particular anyway.)

 

2) Yes, in general, anything that's making a change to the contents of a namespace (or the namespace's folder itself) is likely to be taking a lock for that namespace.

 

3) No, there isn't a way to proactively check for a current namespace lock. You'll need to catch the exception and retry as you mentioned.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?