Facing a crash when using Collection.setDocumentExpiration() over multiple documents in a loop

@bhanuk19 I’m trying to understand the code and scenario that is causing the crash.

Do you have a loop to set document expiration on multiple documents to (current time - 1000) so that the documents will be expired and get purged right away?

If that is the case, how may documents you have tried to set the expiration at once? I’m asking this so we have the exact info to reproduce the issue.

Alternatively, you can also purge (using purge function) the documents in the background to get the same behavior. To avoid blocking the other operations on the UI thread, you can create a new instance of the database to use for that purpose.