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

Method lockTLog

fdbserver/TagPartitionedLogSystem.actor.cpp:3180–3196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3178}
3179
3180ACTOR Future<TLogLockResult> TagPartitionedLogSystem::lockTLog(
3181 UID myID,
3182 Reference<AsyncVar<OptionalInterface<TLogInterface>>> tlog) {
3183
3184 TraceEvent("TLogLockStarted", myID).detail("TLog", tlog->get().id()).detail("InfPresent", tlog->get().present());
3185 loop {
3186 choose {
3187 when(TLogLockResult data = wait(
3188 tlog->get().present() ? brokenPromiseToNever(tlog->get().interf().lock.getReply<TLogLockResult>())
3189 : Never())) {
3190 TraceEvent("TLogLocked", myID).detail("TLog", tlog->get().id()).detail("End", data.end);
3191 return data;
3192 }
3193 when(wait(tlog->onChange())) {}
3194 }
3195 }
3196}

Callers

nothing calls this directly

Calls 8

TraceEventClass · 0.85
detailMethod · 0.80
whenFunction · 0.70
getMethod · 0.65
NeverClass · 0.50
idMethod · 0.45
presentMethod · 0.45
onChangeMethod · 0.45

Tested by

no test coverage detected