Skip to content

chore(backend): process all transactions atomically #46

@matijamarjanovic

Description

@matijamarjanovic

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions