Unreliable Google Firebase transactions
问题 In my (greatly simplified) model I have users, accounts and account_types. Each user can have multiple accounts of each account_type. When an account of type TT is created I'm updating the "users" field of that object so it keeps the users which have accounts of that types, and the number of such accounts they have. users: { some fields }, accounts: { userID: UU, type: TT }, account_type: users: { UU: 31 } } I use the onCreate and onDelete cloud triggers for accounts to update the account