Google cloud firestore 批量多次更新单个文档是否可能超过Firestore';s文档写入限制?

Google cloud firestore 批量多次更新单个文档是否可能超过Firestore';s文档写入限制?,google-cloud-firestore,Google Cloud Firestore,我需要在同一文档中同时删除和添加数组元素 我是通过以下方法做到这一点的 var doc = db.doc(path); var batch = db.batch(); batch.update(doc, {list: firebase.firestore.FieldValue.arrayUnion('post1')}); batch.update(doc, {list: firebase.firestore.FieldValue.arrayRemove('post2')}); batch.c

我需要在同一文档中同时删除和添加数组元素

我是通过以下方法做到这一点的

var doc = db.doc(path);
var batch = db.batch();

batch.update(doc, {list: firebase.firestore.FieldValue.arrayUnion('post1')});
batch.update(doc, {list: firebase.firestore.FieldValue.arrayRemove('post2')});

batch.commit();
我担心Firestore规定的每个文档每秒写入1次。在这种情况下,是否有可能由于单个用户的批处理而导致某些写入失败。
我知道这种情况不会一直发生,但我只是想知道最佳实践的可能性或方式。

如果您在这里没有得到答案,那么会有一个Firestore讨论组,谷歌员工正在观看。如果你在这里没有得到答案,有一个Firestore讨论组,谷歌的工作人员在观看。