This repository was archived by the owner on Nov 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Handle /_async_search/status/:id endpoint
#982
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pdelewski
reviewed
Nov 15, 2024
pdelewski
reviewed
Nov 15, 2024
Contributor
|
LGTM :) |
pdelewski
approved these changes
Nov 15, 2024
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 18, 2024
PR #982 changed how the router works. It fixes some issues, but introduces a bug: "PUT _bulk" is treated as "PUT :index". In this PR : 1. Revert router changes (#982) 2. Fix async handling 3. Fix mapping handling 4. Fix "GET :index" handling (it was always redirected to the elastic) 5. Handle Kibana internal indexes in an explicit way
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Initially this meant to be just addition of an endpoint, but eventually it exposed quite serious bug in
quesma/quesma/router.go.1. Adding
/_async_search/status/:idhandlingBefore that change, requests targeting this endpoint were routed to Elasticsearch which of course had no recollection of our own async IDs
quesma_async_019329bf-4330-7007-970d-e87734bca7c3.This fixes the following behavior, esp. visible when querying larger data sets:

2. Fixing
router.goThe root cause of this bug was in

findHandlerfunction ofquesma/mux/mux.go. Basically, whenever we registered same route twice with diffrent matchers (e.g. for two separate HTTP methods),findHandleralways ditched the second registered func. See screenshot below:Of course I had to add a pretty large test to make sure I don't break stuff.
Closes: #995