-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Right now how transaction processing works is, when event is caught by the backend, it triggers series of mutually independent function calls (all from dbupdater package). The problem with this approach is that some of these function calls may fail for any number of reasons causing inconsistency in database. This behaviour is unaccaptable.
The soultion to this is to create atomic event processing functions, that use the existing functions as helpers. This might not be as simple as it sounds, ideally all of the operations would have to happen in firebase transaction, and right now each of the functions perform their own transactions. This means that only the core part of the transactions should remain in the helpers and the main processing transaction should have the run transaction wrapper.