Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation Update: Firebase-Counter Deletes Subcollection/Shards Once Aggregated #21

Closed
tommyc38 opened this issue Oct 2, 2019 · 6 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@tommyc38
Copy link

tommyc38 commented Oct 2, 2019

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs for a specific extension in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:

  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • To file a bug against the Firebase Extensions platform, or for an issue affecting multiple extensions, please reach out to
    Firebase support directly.

[REQUIRED] Step 2: Describe your configuration

  • Extension name: _ (storage-resize-images, firestore-send-email, etc)
  • Configuration values (redact info where appropriate):
    • _
    • _

[REQUIRED] Step 3: Describe the problem

The documentation would lead you to believe that you will have a persistent subcollection in your documents that have a counter containing count shards. However, this isn't necessarily the case because once the shards are aggregated they get deleted. I thought I was going crazy because I could not find any subcollection with shards but yet somehow the function was accurately counting. It left me scratching my head wondering what was getting counted if they aren't in the DB.

Steps to reproduce:

What happened? How can we make the problem occur?
This could be a description, log/console output, etc.

Expected result

I think it would be helpful to make it more clear that if you are running a few simple tests, you will not see any of these subcollections.

Actual result
@Ehesp
Copy link
Member

Ehesp commented Oct 16, 2019

Hi @tommyc38 thanks for opening the issue. Although this intended, I do think it would be best to let users know about this, to ensure they are only using the "master" counter.

@rachelsaunders would this be best placed here or do you think it requires an explanation within the PREINSTALL doc?

@Ehesp Ehesp added the documentation Improvements or additions to documentation label Oct 16, 2019
@rachelsaunders
Copy link
Contributor

For clarification - does the extension delete the subcollections each time the scheduled function runs?

@tommyc38
Copy link
Author

@rachelsaunders, either I am experiencing a bug or it does indeed delete the sub collection if it has no more shards (docs) to count. Assuming this is intended, having a line or two about this in the docs will be helpful to others who run tests and expect to see a sub collection but don't.

@rachelsaunders
Copy link
Contributor

@Ehesp Friendly ping on my clarification question above? Thx!

@Ehesp
Copy link
Member

Ehesp commented Oct 20, 2019

Hi @rachelsaunders - it deletes them once they have been aggregated yes. Users should sync with the 'master' doc created, as it's unreliable to sync with the aggregators (as they can be removed anytime).

rachelsaunders added a commit that referenced this issue Oct 21, 2019
Issue #21 

- Added clarification that subcollections aren't retained after summation
- Broke section out into steps of the process
rafikhan pushed a commit that referenced this issue Oct 21, 2019
Issue #21 

- Added clarification that subcollections aren't retained after summation
- Broke section out into steps of the process
@rachelsaunders
Copy link
Contributor

closed w/ merge of PR #62

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants