Meteor-Community-Packages / Meteor-Community-Packages/ground-db

Collections take too long to get initialized

Open
#106 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
569
Forks
77
PR merge metrics
No merged PRs in 30d

Description

I am trying to check in Meteor.startup if an object exists in one of my collections and creating it if it doesn't. The code works most of the time but sometimes it just adds a new object because the collection is empty when it checks (this bug seems to occur on hot code pushes quite often). Is there another way I can create the same functionality?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Meteor.startup entry point and reproduce the collection lookup during a hot code push. Then trace GroundDB's collection initialization behavior and determine how the reported empty read occurs. Done means checking for an existing object does not create a duplicate when initialization is still in progress.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.