cmcfarlen commented on code in PR #13616: URL: https://github.com/apache/trafficserver/pull/13616#discussion_r3972071239
########## include/tsutil/Metrics.h: ########## @@ -94,13 +94,20 @@ class Metrics static constexpr int METRIC_TYPE_MASK = 0x1FFF; private: - using NameAndId = std::tuple<std::string, IdType>; - using LookupTable = std::unordered_map<std::string_view, IdType>; - using NameStorage = std::array<NameAndId, MAX_SIZE>; - using AtomicStorage = std::array<AtomicType, MAX_SIZE>; - using NamesAndAtomics = std::tuple<NameStorage, AtomicStorage>; + using NameAndId = std::tuple<std::string, IdType>; + using LookupTable = std::unordered_map<std::string_view, IdType>; + using NameStorage = std::array<NameAndId, MAX_SIZE>; + using AtomicStorage = std::array<AtomicType, MAX_SIZE>; + /// Per slot flag bits, see @c UNLISTED. A parallel array rather than a member of @c NameAndId + /// because an atomic member would make that tuple neither copyable nor movable, and the slot is + /// written there with a tuple assignment. + using FlagStorage = std::array<std::atomic<uint8_t>, MAX_SIZE>; Review Comment: This was already confirmed not to be the case and will zero initialize. -- 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]
