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

Function when

fdbclient/NativeAPI.actor.cpp:2876–2897  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2874 choose {
2875 when(wait(cx->onProxiesChanged())) {}
2876 when(GetKeyServerLocationsReply rep = wait(basicLoadBalance(
2877 cx->getCommitProxies(useProvisionalProxies),
2878 &CommitProxyInterface::getKeyServersLocations,
2879 GetKeyServerLocationsRequest(
2880 span.context, tenant, key, Optional<KeyRef>(), 100, isBackward, version, key.arena()),
2881 TaskPriority::DefaultPromiseEndpoint))) {
2882 ++cx->transactionKeyServerLocationRequestsCompleted;
2883 if (debugID.present())
2884 g_traceBatch.addEvent(
2885 "TransactionDebug", debugID.get().first(), "NativeAPI.getKeyLocation.After");
2886 ASSERT(rep.results.size() == 1);
2887
2888 auto locationInfo = cx->setCachedLocation(
2889 tenant.name, rep.tenantEntry, rep.results[0].first, rep.results[0].second);
2890 updateTssMappings(cx, rep);
2891 updateTagMappings(cx, rep);
2892
2893 return KeyRangeLocationInfo(
2894 rep.tenantEntry,
2895 KeyRange(toRelativeRange(rep.results[0].first, rep.tenantEntry.prefix), rep.arena),
2896 locationInfo);
2897 }
2898 }
2899 }
2900 } catch (Error& e) {

Calls 15

updateTssMappingsFunction · 0.85
updateTagMappingsFunction · 0.85
toRelativeRangeFunction · 0.85
yieldFunction · 0.85
loadBalanceFunction · 0.85
TenantInfoClass · 0.85
TraceEventClass · 0.85
makeStringFunction · 0.85
placeVersionstampFunction · 0.85
mutateStringFunction · 0.85
nowFunction · 0.85

Tested by 1

checkRYWValidMethod · 0.56