You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Index hashmaps of IP addresses by Address::ConstInstanceSharedPtr not string #29529
Title: Index hashmaps of IP addresses by Address::ConstInstanceSharedPtr not string
Description:
Per #29137 (comment) it's suggested that indexing addresses as strings is not ideal. The suggestion is that we could, with a custom hash and custom equality operator, used the existing SharedPtr of the address object, for fewer conversions and faster comparisons. This would be appropriate for listener_worker_routers_ and the upcoming/new UdpForwardingContext in hot_restarting_child.h.
Some caveats as to why this might not have been done before:
For environments without proper dynamic_cast support, ip4addr==ip6addr and vice-versa comparison is currently undefined behavior. (Could be fixed by checking the type before casting, like rhs.ip() != nullptr && rhs.ip().ipv4() != nullptr, and casting should actually not be necessary at all.)
If the map is indexed on smart pointers, I don't think you can look up a value using a reference, so in a context where you don't have a smart pointer available this could be problematic.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.
Activity
github-actions commentedon Oct 11, 2023
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
github-actions commentedon Oct 18, 2023
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.