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

INTR-341 Fix search breaking during deployment #955

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

CamLamb
Copy link
Contributor

@CamLamb CamLamb commented Mar 6, 2025

The search currently breaks because we have atomic rebuild enabled and we do 2 update_index calls, one with --schema-only and one without.

How it breaks:

  • The current search index has documents
  • The first update_index call with --schema-only builds a new index with just the schema changes and then changes the pointer for the search backend to use this new index (This index has NO documents)
  • The second update_index call populates the documents and then changes the pointer over when done

How to test this locally:

  • Start your local environment on the main branch

  • Run ./manage.py update_index_async

  • Navigate to some search results (ideally with people in the response)

  • Re run the update_index_async command and keep refreshing the search results page

    • If you are (un)lucky you will catch the scenario where some of the indexes have completed and some haven't, resulting in no/partial search results showing
  • To test the fix, simply checkout this branch and rerun the above steps 😄

  • JIRA ticket referenced in title

  • Title is clear and concise

  • Description gives any relevant detail

  • Tests are up to date

  • Documentation is up to date

@CamLamb CamLamb requested review from marcelkornblum and a team as code owners March 6, 2025 10:13
Copy link
Contributor

@marcelkornblum marcelkornblum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember why we did this in the first place but it seems very much the right change to make :D

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