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

Method cloneAndReset

fdbclient/NativeAPI.actor.cpp:3211–3230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3209 readVersionObtainedFromGrvProxy(true), tenant_(tenant), tenantSet(tenant.present()) {}
3210
3211Reference<TransactionState> TransactionState::cloneAndReset(Reference<TransactionLogInfo> newTrLogInfo,
3212 bool generateNewSpan) const {
3213
3214 SpanContext newSpanContext = generateNewSpan ? generateSpanID(cx->transactionTracingSample) : spanContext;
3215 Reference<TransactionState> newState =
3216 makeReference<TransactionState>(cx, tenant_, cx->taskID, newSpanContext, newTrLogInfo);
3217
3218 if (!cx->apiVersionAtLeast(16)) {
3219 newState->options = options;
3220 }
3221
3222 newState->numErrors = numErrors;
3223 newState->startTime = startTime;
3224 newState->committedVersion = committedVersion;
3225 newState->conflictingKeys = conflictingKeys;
3226 newState->authToken = authToken;
3227 newState->tenantSet = tenantSet;
3228
3229 return newState;
3230}
3231
3232TenantInfo TransactionState::getTenantInfo(AllowInvalidTenantID allowInvalidId /* = false */) {
3233 Optional<TenantName> const& t = tenant();

Callers 1

resetImplMethod · 0.80

Calls 2

generateSpanIDFunction · 0.85
apiVersionAtLeastMethod · 0.45

Tested by

no test coverage detected