MCPcopy Create free account
hub / github.com/apple/foundationdb / removeRole

Method removeRole

flow/Trace.cpp:546–558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544 }
545
546 void removeRole(std::string const& role) {
547 MutexHolder holder(mutex);
548
549 RoleInfo& r = mutateRoleInfo();
550
551 auto itr = r.roles.find(role);
552 ASSERT(itr != r.roles.end() || (g_network->isSimulated() && g_network->getLocalAddress() == NetworkAddress()));
553
554 if (itr != r.roles.end() && --(*itr).second == 0) {
555 r.roles.erase(itr);
556 r.refreshRolesString();
557 }
558 }
559
560 void setLogGroup(const std::string& logGroup) {
561 MutexHolder holder(mutex);

Callers 1

removeTraceRoleFunction · 0.45

Calls 7

refreshRolesStringMethod · 0.80
NetworkAddressClass · 0.50
findMethod · 0.45
endMethod · 0.45
isSimulatedMethod · 0.45
getLocalAddressMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected