I have a function that tries to add documents to a collection, first I wrote the function to check if the document exists by ID and if so, not add it. After the first run the async queue went sideways and all my other async function went on "waiting" for a few minutes, completely broke production. Then I did a "try catch" to write a document and if Doc ID exists it will catch but that also after first few runs sent rest of my async functions on "waiting". Just to be clear, working with Dart runtimes and the number of check can in the tens of thousands and fails can be as well but I would not expect the system to then take a 20 minute breather to recover.
Not sure why since none of the container logs point me to a direction as to why it happens but if you stress the function out with too much database checks and fails the whole thing goes on a waiting spree and everything async stops.
has anyone else faced this and has a work around ?