fix: preserve live collection during alias-based reindex#24
fix: preserve live collection during alias-based reindex#24jasonbosco merged 4 commits intotypesense:masterfrom
Conversation
- assert reindex builds and swaps before deleting the old collection
- verify the alias stays searchable while the replacement is built
|
hi @tharropoulos, it's me again :) Do you think this will also resolve the issue of joins requiring re-indexing when the alias of one of their references changes? For example, when I run |
|
@haleyngonadi It should fix that case as well, as the alias was dangling before this fix. I actually just wrote a test to verify that joins continue to work when reindexing the referenced collection. That said, I'd still be a little careful about generalizing too far from one passing case. With JOINs, when aliases are used in reference fields, related collections may need to be reindexed together because of how internal reference IDs are handled. Here're some docs around Aliases with JOINs |
|
Thank you for fixing it. @tharropoulos, will you ship a new gem release? |
Change Summary
reindexcauses downtime when alias is already set up,delete_collectioncalled before new collection is ready #23PR Checklist