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

Idempotent DELETE by ids, optimizing performance #659

Closed
andrus opened this issue Dec 1, 2023 · 0 comments
Closed

Idempotent DELETE by ids, optimizing performance #659

andrus opened this issue Dec 1, 2023 · 0 comments
Milestone

Comments

@andrus
Copy link
Contributor

andrus commented Dec 1, 2023

Currently during DELETE, if the object corresponding to a specified ID is not found, a 404 exception is thrown. If we run multiple IDs, any one object that is not found will block the entire operation, which goes against the idempotent nature of DELETE. So the changes per this task:

  • If DELETE has multiple IDs, all objects are fetched at once (this is a nice performance optimization)
  • If some objects are not matched, all other objects should still be deleted
  • The response will be 200 in all cases, except one - when zero matching objects where found. In that case Agrest will continue returning 404
@andrus andrus added this to the 5.0-M20 milestone Dec 1, 2023
@andrus andrus closed this as completed Dec 1, 2023
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

1 participant