如果我更新一个与现有文档内容相同的文档,即使它没有对当前文档的内容进行任何更改,也会算作一次写入吗?
换句话说,Firestore 是否会在不检查文档内每个键的值的情况下更新文档?
最佳答案
If I update a document with the same content as the existing one, will it count as a write even if it doesn't change anything to the current document's content?
是的,确实如此。
In other words, does Firestore update the document without checking the values of each key inside the document?
是的,它确实会更新,它会覆盖整个文档,无论是否相同。 Firestore 没有检查文档是否相同的机制。你应该检查一下。
关于firebase - 更新后的 Firestore 计费,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61341604/