traeak commented on code in PR #12593: URL: https://github.com/apache/trafficserver/pull/12593#discussion_r4509147831
########## include/proxy/http/remap/NextHopStrategyFactory.h: ########## @@ -50,11 +51,16 @@ class NextHopStrategyFactory // counted and attached to an HttpSM. NextHopSelectionStrategy *strategyInstance(const char *name) const; + // Pointer comparison only; safe to call with a dangling pointer. + bool contains(NextHopSelectionStrategy const *strategy) const; + bool strategies_loaded; private: std::string fn; void loadConfigFile(const std::string &file, std::stringstream &doc, std::unordered_set<std::string> &include_once); void createStrategy(const std::string &name, const NHPolicyType policy_type, ts::Yaml::Map &node); std::unordered_map<std::string, NextHopSelectionStrategy *> _strategies; + std::unordered_set<NextHopSelectionStrategy const *> _strategy_ptrs; Review Comment: taken -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
