0
votes

if you see here https://firebase.google.com/docs/firestore/solutions/delete-collections

you can see the below

Consistency - the code above deletes documents one at a time. If you query while there is an ongoing delete operation, your results may reflect a partially complete state where only some targeted documents are deleted. There is also no guarantee that the delete operations will succeed or fail uniformly, so be prepared to handle cases of partial deletion.

so how to handle this correctly?

this means "preventing users from accessing this collection while deletion is in progress?"

or "If the work is stopped by accessing the collection in the middle, is it to call the function again from the failed part to proceed with the complete deletion?"

1

1 Answers

1
votes

so how to handle this correctly?

It's suggesting that you should check for failures, and retry until there are no documents remaining (or at least until you are satisfied with the result).