firebase - Firestore 函数触发器算作读取吗?

标签 firebase google-cloud-firestore google-cloud-functions

我知道您可能在想什么,“为什么这很重要?不要为了优化定价而试图使其过于复杂”。就我而言,我需要这样做。

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

我的问题是:

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

最佳答案

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

关于firebase - Firestore 函数触发器算作读取吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57398059/

相关文章:

javascript - 为什么在响应时创建文档时不触发 firebase 云功能

javascript - Firebase 云函数 - promise : Is there any limitation to the number of 'promises' that can be added to Promise. all()?

python - 有没有办法在函数外部从已部署的 Google Cloud Function 导入 python 帮助程序库?

firebase - SwiftUI firebase - 更改用户的显示名称 - 如何立即刷新 View

android - 无法在 Android 上使用 Cloud Firestore 保存文档

javascript - 带有转换器的 Firebase 函数在 Set() 上删除文档引用

firebase - 如何在 Firestore 中存储 Markdown 文本?

android - FirebaseMessagingService - 如何从后台更新数据库或 SharedPreferences?

ios - firebase onDisconnectSetValue 未按预期工作

javascript - 从 webapps 的 firebase 读取用户数据后,在 html 标签中显示用户数据