Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do Firestore Function Triggers count as reads?

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.

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.

My question is:

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

like image 557
Carlino Gonzalez Avatar asked Aug 07 '19 15:08

Carlino Gonzalez


1 Answers

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.

like image 194
Doug Stevenson Avatar answered Sep 21 '22 18:09

Doug Stevenson