Nicolas Domergue
Nicolas Domergue

Reputation: 113

Does Firestore document update request run if the value didn't change?

I'm quite new to Firebase and I was having this question:

What happens if I run an update request for a Firestore document and the data in the document and the one in the update request are the same? Does that update counts for Firebase billing? Or Firestore automatically detects that the data is the same and don't even run request?

Upvotes: 2

Views: 444

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317467

Every update is billed. There are no "free" updates. If you want to avoid an update if nothing changed, you will have to read the document first and determine for yourself if you want to update.

Upvotes: 2

Related Questions