1
votes

Out of thousands of executions of my cloud function which is triggered whenever a document is created or updated in a firestore collection, it happened twice that the function was not triggered at all. I have no idea why and everything seems to work normally otherwise without changing any code. I noticed that the document was actually updated by the client but for some reason the function didn't execute (as verified using logs which has no trace of a function run after the client updated the doc).

How could this happen? Should I expect such issues because firestore is currently in beta? Once again it's a very rare occurrence but it does lead to our Android app's customers' workflow getting affected and we want to know what can be done from our end to prevent such an issue.

1

1 Answers

0
votes

Sharing the answer that I got from @abeisgreat on Twitter at https://twitter.com/abeisgreat/status/1070704684195692544 :-

"Do you have function retries set up? This page explains it https://firebase.google.com/docs/functions/retries. Without retries we promise "up to one invocation" per event, which means out of thousands of events it's possible a couple get dropped, but you can switch it to "at least once" to remove misses."