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

feat(model): make syncIndexes() not call createIndex() on indexes that already exist #15175

Merged
merged 2 commits into from
Jan 11, 2025

Conversation

vkarpov15
Copy link
Collaborator

Summary

Following up on #12250: syncIndexes() still calls createIndex on indexes that already exist - toCreate is ignored except for when toCreate is an empty array re: #12785. I recently ran into this issue again, and I figure it is worth fixing, at least in a minor release.

I also needed to add an option to diffIndexes() to make it return both index spec and index options in toCreate(), so we know what index options to use if using toCreate.

Examples

@vkarpov15 vkarpov15 added this to the 8.10 milestone Jan 10, 2025
@vkarpov15 vkarpov15 merged commit 67a30e7 into 8.10 Jan 11, 2025
76 checks passed
@hasezoey hasezoey deleted the vkarpov15/sync-indexes-tocreate branch January 12, 2025 09:49
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