问题
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