-
Notifications
You must be signed in to change notification settings - Fork 141
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
Cannot find route to use #101
Comments
Hello! |
@delvedor hello, the same issue is happening with the latest release 1.17.1 |
I think the only way to fix this us to have a different trie for every http method. |
Another way to fix this issue could be storing some useful information on each trie node and use those information to make decision in |
@IpaliboWhyte what would you have in mind? |
@mcollina Hey, sorry for the late reply. The problem I see so far is that we go too far in the tree. In this case we go too far to search for This issue is also reproducible with these two routes and this search query => In theory, if nodes have some stored property which describes the subpath length of a route (based on slash delimiters), by using the search query subpath length we could do a best fit scan to return a more accurate child node. My guess is that Example:
The path Just my thought for now, hopefully this makes sense :) |
Not sure that the approach you describe will work. Route 1: The generated tree will be
If we start splitting on the slash when a new request comes in we will lose all the benefits of the above data structure, and that point it will be a better idea refactor the entire module (already did it, the performances were not as good). |
good point, might affect performance alot. I'll try to take a deep dive into this when I get some time :) |
This issue was fixed. I added a test here #261. We can close this. |
Works as expected
GET http://localhost:4000/test_namespace/test_type/test_id
GET http://localhost:4000/test_namespace/jobss/test_id
Does not work
GET http://localhost:4000/test_namespace/jobs/test_id
The text was updated successfully, but these errors were encountered: