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

Wait for indexing to be done before returning data #228

Closed
Tracked by #268
gmaclennan opened this issue Aug 27, 2023 · 0 comments · Fixed by #389
Closed
Tracked by #268

Wait for indexing to be done before returning data #228

gmaclennan opened this issue Aug 27, 2023 · 0 comments · Fixed by #389
Assignees

Comments

@gmaclennan
Copy link
Member

gmaclennan commented Aug 27, 2023

Description

Any read operations on data types (e.g. project.observations.getMany() should wait until all available data has been indexed before returning data. This is particularly important on first start of the app with unindexed data.

One way to implement this is to add a dataType.onIndexIdle() function. It should wait for the cores in the dataStore namespace to be ready() first, then wait a tick so that indexing can start, then if the index state is not idle, wait until it is idle. Either that or we should set the initial index state to indexing, and set to idle once the core is ready and we know there is no data.

Tasks

  • [ ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants