Document Updates - Do updates with no changes still cost 1 write?

佐手、 提交于 2020-06-08 13:19:05

问题


Do document updates, where the update from a client, has no difference with the Firestore server copy still cost in terms of number of writes?

Also would a cloud function that is listening for updates also be invoked?


回答1:


According to the Cloud Firestore Pricing documentation, each set() or update() operation will count as a write. In this case, you will still be charged with the cost of 1 write when called with new changes or not.




回答2:


Document updates all incur billing for a write. But Cloud Functions and realtime listeners will not be invoked if data doesn't actually change in the document. The only situation where I suspect a listener might be invoked is if the client itself attempts to make an update to the same document it's listening to, but I'm not sure about that.



来源:https://stackoverflow.com/questions/57960599/document-updates-do-updates-with-no-changes-still-cost-1-write

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!