-
Notifications
You must be signed in to change notification settings - Fork 0
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
Bulk image deletion #227
Comments
I'm actually not sure that we did end up setting a maximum number of images we could delete? I can't find any indication that we did in the the frontend or animl-api code. So a first step would be to stress test how many images |
It does not appear that there is any kind of limit on how many images a user can delete at once. In this instance, a user tried to delete 2304 images in one go and the GraphQL Lambda timed out. I'm not sure exactly how many were successfully deleted, but I assume the actual threshold is much lower. @jue-henry, let me know when you have a chance to test out how many images the GraphQL Lambda can delete comfortably? I think once you've done that I'll temporarily put a limit on the delete images operation until this is implemented so users don't run into issues again. |
@nathanielrindlaub I did a rough benchmark and I think 100 images might be a good break point. I first started with deleting 1k images, and got an error which seems to be when node hits its limit of open sockets, and only about 100-150 images got deleted before erroring out. So then I tried 100 images and it took about 3.5 seconds to delete, and I think thats a pretty good spot honestly. But let me know if you want me to push this higher |
From an architectural, database perspective, I would be careful to delete along search results (it would be even more problematic if we were to use a search engine because at some point direct database search might become unwieldy). If it was my decision I would allow for: a) Manually checking pictures from a search result and then delete I feel with an API delete on research results we are softening some very useful principals of API design. |
An additional thought, deleting on search results would lead to situations where the user has a hard time to fully understand the consequences of their action. |
…on-limits #227 enforce bulk image deletion limits
Right now, users can delete images via bulk-selecting them and clicking "delete images", but because it's not implemented as an async task, we limit it to a maximum of 500 images at a time to prevent timeouts. It would be great to support the deletion of more images now that we have the async task management service in place. I think this would involve the following:
deleteImagesAsync
that can accept filters as an input. We should keep the currentdeleteImages
mutation & workflow to allow for users doing the bulk-selection or individual image approach.The text was updated successfully, but these errors were encountered: