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

fix: fix index loading #1742

Merged
merged 2 commits into from
Aug 25, 2023
Merged

Conversation

dranikpg
Copy link
Contributor

Now indices are built separately after they've been read.

  1. Instead of splitting the Init/Rebuild steps, they could've been collected as strings and build fully after loading. But it would've made the dfs loading / search code more complex. Now they're created & validated & stored, but not populated with documents.

  2. Either way we'll need some kind of post-load controller. Alternatively we store the index definitions in all shards and all loading steps are fully independent

  3. Index construction will be async at some point either way, so it will be enough just to notify the "async index creator" after loading that it can run

For now I hope this fix suffices 👀

Signed-off-by: Vladislav Oleshko <[email protected]>
@dranikpg dranikpg requested a review from kostasrim August 25, 2023 14:27
kostasrim
kostasrim previously approved these changes Aug 25, 2023
src/server/search/doc_index.cc Outdated Show resolved Hide resolved
Co-authored-by: Kostas Kyrimis  <[email protected]>
Signed-off-by: Vladislav <[email protected]>
Signed-off-by: Vladislav Oleshko <[email protected]>
@dranikpg dranikpg force-pushed the fix-index-persistence branch from d5f665b to efdb2a5 Compare August 25, 2023 15:05
@dranikpg dranikpg merged commit f1ac4b0 into dragonflydb:main Aug 25, 2023
kostasrim added a commit that referenced this pull request Aug 29, 2023
* fix: fix index loading

Signed-off-by: Vladislav <[email protected]>
Co-authored-by: Kostas Kyrimis <[email protected]>
@dranikpg dranikpg deleted the fix-index-persistence branch September 15, 2023 06:37
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 this pull request may close these issues.

2 participants