Reentrancy
the fallback mechanism may allow an attacker to re-enter the caller function
Reentrancy
the fallback mechanism may allow an attacker to re-enter the caller function
However, sometimes actions can't be rolled back and it is unfortunately unavoidable. For example, consider when we send emails during the call to process. If we send before saving a record and that record fails to save what do we do? We can't unsend that email.
I typically save everything I can first, and then call the side-effects afterwards. If the side-effects fail I can handle them elsewhere and retry when necessary.
Cloud Functions working on the server or WriteBatches working on the client