Skip to content

Commit f15ccee

Browse files
rachelsaundersrafikhan
authored andcommitted
add clarification that subcollections aren't retained (#62)
Issue #21 - Added clarification that subcollections aren't retained after summation - Broke section out into steps of the process
1 parent 0f0ba9f commit f15ccee

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

firestore-counter/POSTINSTALL.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,15 @@ gcloud scheduler jobs create http firestore-sharded-counter-controller --schedul
7171

7272
### Using the extension
7373

74-
After you complete the post-installation configuration above, your extension will create subcollections in all the documents that your app uses as counters. The client SDK will write to these subcollections to distribute the write load, and the scheduled function you deployed will sum the subcollections' values into the single `visits` field (or whichever field you configured).
74+
After you complete the post-installation configuration above, the process runs as follows:
75+
76+
1. Your extension creates subcollections in all the documents that your app uses as counters.
77+
78+
1. The client SDK writes to these subcollections to distribute the write load.
79+
80+
1. The scheduled function that you deployed sums the subcollections' values into the single `visits` field (or whichever field you configured in your master document).
81+
82+
1. After each summation, the extension deletes the subcollections, leaving only the count in the master document. This is the document field to which you should listen for the count.
7583

7684
### Monitoring
7785

0 commit comments

Comments
 (0)