I have this line in Nodejs:
db.collection("foo").doc(fooId).set(fooDtoModified);
If I return before this line, I see a certain amount of reads and writes. If I return right after this line, I see 9 reads and 1 write more. I understand the writing, but what causes the 9 reads?
When you're calling set()
you're only writing data to Firestore. You're not reading anything. So the shared line of code doesn't cause any read operations in Firestore. As @FrankvanPuffelen mentioned in his comment, the reads are likely to come from other parts of your code, or from the Firebase Console.
From my experience, one of the most known common sources of unexpected reads is indeed the Firebase Console. The console is considered a client like any other web or mobile client. Here are some info: