Is there some undocumented limit to amount to documents a function can delete? Wrote a function to clean a collections stale document but function stops after index 24 and gives a out of bounds error even though listDocuments has more ID's
Summary
Summary: The user is experiencing an issue where their function is unable to delete more than 25 documents at once. They have written a function in Dart that lists and loops through documents to delete them. Other users suggest that there may be a rate limit or an issue with pagination. The user is also curious if there is an undocumented limit to the number of documents a function can delete.
Solution: It is suggested to check if there is a rate limit or implement pagination in the function. It is also recommended to provide more information about the specific use case.
joeyouss
Apr 3, 2023, 11:46
Hi, no I don’t think so it does. Are you implementing paging? What’s your use case?
joeyouss
Apr 3, 2023, 11:47
There could be a rate limit (but still way more than 24) if the speed is too fast but I think it would be better if you maybe share about your use case so I can understand
punti_z
Rank 3: Container
Apr 3, 2023, 21:49
Use case is fairly straight forward. Users create temp chat sessions and once the session is over a function is triggered that cleans all documents related to that specific chat ID. The server side function is written in dart and all it does is lists documents based on the chat room ID and for loops to delete documents
punti_z
Rank 3: Container
Apr 3, 2023, 21:49
I will try to share the code snippet shortly but its essentially exactly as described
rafagazani
Rank 3: Container
Apr 4, 2023, 03:57
please share the code as you are scrolling through and deleting the documents.