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 hang on /indexes and /stats routes #4308

Merged
merged 1 commit into from
Jan 10, 2024
Merged

Fix hang on /indexes and /stats routes #4308

merged 1 commit into from
Jan 10, 2024

Conversation

dureuill
Copy link
Contributor

@dureuill dureuill commented Jan 9, 2024

Pull Request

Related issue

Fixes #4218

Context

  • A previous fix added a field to the IndexScheduler to memorize the currently_updating_index, so that accessing it through the search would return the handle without trying to open it. This resolved a hang on the search, but /indexes and /stats routes hang when search requests on multiple indexes are running #4218 reported further hangs on the /indexes and /stats routes
  • These routes were shunting the IndexScheduler and using internal IndexMapper logic to access the indexes, again trying to reopen the updating index.

What does this PR do?

  • Moves the logic relative to the currently_updating_index from the IndexScheduler to the IndexMapper, so that any index request to the IndexMapper can benefit from it.

Test

  1. Follow reproducer from /indexes and /stats routes hang when search requests on multiple indexes are running #4218
  2. Before this PR, notice a hang on /stats and /indexes, but not on /indexes/<updating_index>/search
  3. After this PR, notice no hang on either of /stats, /indexes or /indexes/<updating_index>/search

Copy link
Member

@Kerollmops Kerollmops left a comment

Choose a reason for hiding this comment

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

This PR looks good to me, especially because you just moved stuff from one place to another 👍
bors merge

Copy link
Contributor

meili-bors bot commented Jan 10, 2024

Build succeeded:

@meili-bors meili-bors bot merged commit 93363b0 into release-v1.6.0 Jan 10, 2024
10 checks passed
@meili-bors meili-bors bot deleted the fix_hang branch January 10, 2024 11:18
@meili-bot meili-bot added the v1.6.0 PRs/issues solved in v1.6.0 released on 2024-01-15 label Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.6.0 PRs/issues solved in v1.6.0 released on 2024-01-15
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants