Controller Metrics & Network Config Request Fix (#2003)

* add new metrics for network config request queue size and sso expirations
* move sso expiration to its own thread in the controller
* fix potential undefined behavior when modifying a set
This commit is contained in:
Grant Limberg 2023-05-16 11:56:58 -07:00 committed by GitHub
parent f621261ff9
commit adfbbc3fb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 68 additions and 31 deletions

View file

@ -81,6 +81,7 @@ public:
private:
void _request(uint64_t nwid,const InetAddress &fromAddr,uint64_t requestPacketId,const Identity &identity,const Dictionary<ZT_NETWORKCONFIG_METADATA_DICT_CAPACITY> &metaData);
void _startThreads();
void _ssoExpiryThread();
std::string networkUpdateFromPostData(uint64_t networkID, const std::string &body);
@ -138,6 +139,9 @@ private:
std::vector<std::thread> _threads;
std::mutex _threads_l;
bool _ssoExpiryRunning;
std::thread _ssoExpiry;
std::unordered_map< _MemberStatusKey,_MemberStatus,_MemberStatusHash > _memberStatus;
std::mutex _memberStatus_l;