I already asked this question to Firebase Support but they suggested to ask this question on community platforms. So I'm asking this question here in Stack Overflow.
- Suppose a user creates new data in Firebase realtime database node.
- This will trigger the onCreate cloud function, if added on that node.
- In that cloud function, we are processing the added data such as updating the data by adding a new child by translating the particular child into a particular language.
- While the onCreate cloud function is processing, suppose the user deletes the added data.
- At this time, data is deleted but the onCreate cloud function is still processing and as a result, we will have a single child at that firebase path which contains the language translated data. This data is useless as it is already deleted by the user.
The questions are:
- How can we solve this issue?
- What is the better approach to solving these kinds of issues?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…