Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protocol does not handle race against a resource #146

Open
mmatuska opened this issue Sep 29, 2019 · 2 comments
Open

Protocol does not handle race against a resource #146

mmatuska opened this issue Sep 29, 2019 · 2 comments

Comments

@mmatuska
Copy link

The protocol does not tell us what to do if a PATCH, DELETE or HEAD request is submitted against the same resource as an already running PATCH upload. How should the server tell the client that the resource is busy?

@Acconut
Copy link
Member

Acconut commented Sep 30, 2019

That's true, the protocol does not specify this. Most implementations (e.g. tusd) do not allow concurrent access and will return a 423 Locked status if they detect parallel requests to the same upload resource.

However, since an implementation may also allow concurrent requests (e.g. a HEAD request while a PATCH request is running), the protocol does not currently force locking upon implementations.

@mitar
Copy link

mitar commented Apr 15, 2024

One alternative to locks is something called idempotency keys. It is very useful when primarily source of conflicts comes from the fact that the client itself retried, but the server has not yet noticed that the previous attempt failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants