Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Conversation

@mieciu
Copy link
Member

@mieciu mieciu commented Nov 13, 2024

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/:id handling

Before 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:
image

2. Fixing router.go

The root cause of this bug was in findHandler function of quesma/mux/mux.go. Basically, whenever we registered same route twice with diffrent matchers (e.g. for two separate HTTP methods), findHandler always ditched the second registered func. See screenshot below:
image

Of course I had to add a pretty large test to make sure I don't break stuff.

Closes: #995

@mieciu mieciu marked this pull request as ready for review November 15, 2024 11:19
@mieciu mieciu requested a review from a team as a code owner November 15, 2024 11:19
@pdelewski
Copy link
Contributor

LGTM :)

@mieciu mieciu added this pull request to the merge queue Nov 15, 2024
Merged via the queue into main with commit d36b617 Nov 15, 2024
5 checks passed
@mieciu mieciu deleted the async-status branch November 15, 2024 12:36
@nablaone nablaone mentioned this pull request Nov 18, 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.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle _async_search/status/:id endpoint

3 participants