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

Function when

fdbserver/TLogServer.actor.cpp:2654–2681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2652
2653 loop choose {
2654 when(wait(dbInfoChange)) {
2655 dbInfoChange = self->dbInfo->onChange();
2656 bool found = false;
2657 if (self->dbInfo->get().recoveryState >= RecoveryState::ACCEPTING_COMMITS) {
2658 for (auto& logs : self->dbInfo->get().logSystemConfig.tLogs) {
2659 if (std::count(logs.tLogs.begin(), logs.tLogs.end(), logData->logId)) {
2660 found = true;
2661 break;
2662 }
2663 }
2664 }
2665 if (found && self->dbInfo->get().logSystemConfig.recruitmentID == logData->recruitmentID) {
2666 logData->logSystem->set(ILogSystem::fromServerDBInfo(self->dbgid, self->dbInfo->get()));
2667 if (!logData->isPrimary) {
2668 logData->logSystem->get()->pop(logData->logRouterPoppedVersion,
2669 logData->remoteTag,
2670 logData->durableKnownCommittedVersion,
2671 logData->locality);
2672 }
2673
2674 if (!logData->isPrimary && logData->stopped()) {
2675 TraceEvent("TLogAlreadyStopped", self->dbgid).detail("LogId", logData->logId);
2676 logData->removed = logData->removed && logData->logSystem->get()->endEpoch();
2677 }
2678 } else {
2679 logData->logSystem->set(Reference<ILogSystem>());
2680 }
2681 }
2682 when(TLogPeekStreamRequest req = waitNext(tli.peekStreamMessages.getFuture())) {
2683 TraceEvent(SevDebug, "TLogPeekStream", logData->logId)
2684 .detail("Token", tli.peekStreamMessages.getEndpoint().token);

Calls 15

countFunction · 0.85
TraceEventClass · 0.85
nondeterministicRandomFunction · 0.85
nowFunction · 0.85
stoppedMethod · 0.80
detailMethod · 0.80
endEpochMethod · 0.80
randomUniqueIDMethod · 0.80
addAttachMethod · 0.80
firstMethod · 0.80
addEventMethod · 0.80
getQueuingMetricsFunction · 0.70

Tested by

no test coverage detected