-
Notifications
You must be signed in to change notification settings - Fork 38.4k
Optimize Request Predicate attribute merging #32245
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
Comments
Line 1247 in 6e9607c
Lines 1267 to 1269 in 6e9607c
What an interesting issue! I think we can use some I fixed similar issue on another opensource before, so if you busy I can create PR :) thank you! |
@injae-kim There are a lot of intrinsic details that can go wrong here, which has caused many regressions in the past. So I'd rather tackle this one myself, thanks! |
Aha thanks for the explanation! I got it. |
This commit ensures that a copy is made of old attributes before replacing it with new attributes. Because new attributes can be composed of old, clearing the old would also remove entries from the new. See gh-32245
Before this commit, creating a CompositeMap from two maps with the same key has strange results, such as entrySet returning duplicate entries with the same key. After this commit, we give precedence to the first map by filtering out all entries in the second map that are also mapped by the first map. See gh-32245
When using router functions, the bulk of RequestPredicate execution is spent in attribute map merging. We should consider ways to improve this, for instance by using composite maps instead of allocating new ones.
The text was updated successfully, but these errors were encountered: