Firestore 函数触发器是否计为读取? [英] Do Firestore Function Triggers count as reads?

查看:13
本文介绍了Firestore 函数触发器是否计为读取?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道您可能在想什么,它为什么重要?不要为了优化定价而试图使其过于复杂".就我而言,我需要.

I know what you are probably thinking, "why does it matter? Don't try to over-complicate it just to optimize pricing". In my case, I need to.

我在 Firestore 中有一个包含数百万条记录的集合,每个文档都会经常更新.每次更新时,我都需要进行一些数据清理(等等).所以我有一个由 onUpdate 执行的函数触发器.函数中有两个参数:更新前的文档和更新后的文档.

I have a collection with millions of records in Firestore, and each document gets updated quite often. Every-time one gets updated, I need to do some data-cleaning (and more). So I have a function trigger by onUpdate that does that. In the function there's two parameters: document before update and document after update.

我的问题是:

由于文档是作为参数传递的,这算作数据库读取吗?

Because the document is been passed as an argument, does that count as a database read?

推荐答案

Cloud Firestore 生成的发送到 Cloud Functions 的事件不应算作超出客户端最初触发该事件所做的额外读取.

The event generated by Cloud Firestore to send to Cloud Functions should not count as an extra read beyond what what was done by the client to initially trigger that event.

这篇关于Firestore 函数触发器是否计为读取?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆