-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle
/_async_search/status/:id
endpoint (#982)
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: <img width="1425" alt="image" src="https://github.com/user-attachments/assets/c2bd4720-3377-44f5-9dee-5b926d20184f"> ### 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: <img width="724" alt="image" src="https://github.com/user-attachments/assets/9b2c022a-eb0f-42f7-a1ed-c7d1547ae325"> Of course I had to add a pretty large test to make sure I don't break stuff. Closes: #995
- Loading branch information
Showing
9 changed files
with
191 additions
and
44 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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