remove debug traces
This commit is contained in:
parent
c1ce4b361b
commit
fe350f4514
|
@ -1318,9 +1318,7 @@ struct CreateTenantImpl {
|
||||||
ACTOR template <class DB>
|
ACTOR template <class DB>
|
||||||
Future<Void> createTenant(Reference<DB> db, TenantName name, TenantMapEntry tenantEntry) {
|
Future<Void> createTenant(Reference<DB> db, TenantName name, TenantMapEntry tenantEntry) {
|
||||||
state CreateTenantImpl<DB> impl(db, name, tenantEntry);
|
state CreateTenantImpl<DB> impl(db, name, tenantEntry);
|
||||||
TraceEvent("BreakpointAttemptCreate").detail("Name", name);
|
|
||||||
wait(impl.run());
|
wait(impl.run());
|
||||||
TraceEvent("BreakpointCreateSuccess").detail("Name", name);
|
|
||||||
return Void();
|
return Void();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1461,26 +1459,14 @@ struct DeleteTenantImpl {
|
||||||
// Get information about the tenant and where it is assigned
|
// Get information about the tenant and where it is assigned
|
||||||
bool deletionInProgress = wait(self->ctx.runManagementTransaction(
|
bool deletionInProgress = wait(self->ctx.runManagementTransaction(
|
||||||
[self = self](Reference<typename DB::TransactionT> tr) { return getAssignedLocation(self, tr); }));
|
[self = self](Reference<typename DB::TransactionT> tr) { return getAssignedLocation(self, tr); }));
|
||||||
TraceEvent("BreakpointDeleteAfterAssigned")
|
|
||||||
.detail("TenantName", self->tenantName)
|
|
||||||
.detail("PairName", self->pairName.present() ? self->pairName.get() : TenantName())
|
|
||||||
.detail("TenantId", self->tenantId);
|
|
||||||
|
|
||||||
if (!deletionInProgress) {
|
if (!deletionInProgress) {
|
||||||
wait(self->ctx.runDataClusterTransaction(
|
wait(self->ctx.runDataClusterTransaction(
|
||||||
[self = self](Reference<ITransaction> tr) { return checkTenantEmpty(self, tr); }));
|
[self = self](Reference<ITransaction> tr) { return checkTenantEmpty(self, tr); }));
|
||||||
TraceEvent("BreakpointDeleteAfterCheckEmpty")
|
|
||||||
.detail("TenantName", self->tenantName)
|
|
||||||
.detail("PairName", self->pairName.present() ? self->pairName.get() : TenantName())
|
|
||||||
.detail("TenantId", self->tenantId);
|
|
||||||
|
|
||||||
wait(self->ctx.runManagementTransaction([self = self](Reference<typename DB::TransactionT> tr) {
|
wait(self->ctx.runManagementTransaction([self = self](Reference<typename DB::TransactionT> tr) {
|
||||||
return markTenantInRemovingState(self, tr);
|
return markTenantInRemovingState(self, tr);
|
||||||
}));
|
}));
|
||||||
TraceEvent("BreakpointDeleteAfterMark")
|
|
||||||
.detail("TenantName", self->tenantName)
|
|
||||||
.detail("PairName", self->pairName.present() ? self->pairName.get() : TenantName())
|
|
||||||
.detail("TenantId", self->tenantId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete tenant on the data cluster
|
// Delete tenant on the data cluster
|
||||||
|
@ -1496,18 +1482,9 @@ struct DeleteTenantImpl {
|
||||||
return pairDelete && TenantAPI::deleteTenantTransaction(
|
return pairDelete && TenantAPI::deleteTenantTransaction(
|
||||||
tr, self->tenantName, self->tenantId, ClusterType::METACLUSTER_DATA);
|
tr, self->tenantName, self->tenantId, ClusterType::METACLUSTER_DATA);
|
||||||
}));
|
}));
|
||||||
TraceEvent("BreakpointDeleteAfterDataUpdate")
|
|
||||||
.detail("TenantName", self->tenantName)
|
|
||||||
.detail("PairName", self->pairName.present() ? self->pairName.get() : TenantName())
|
|
||||||
.detail("TenantId", self->tenantId);
|
|
||||||
|
|
||||||
wait(self->ctx.runManagementTransaction([self = self](Reference<typename DB::TransactionT> tr) {
|
wait(self->ctx.runManagementTransaction([self = self](Reference<typename DB::TransactionT> tr) {
|
||||||
return deleteTenantFromManagementCluster(self, tr);
|
return deleteTenantFromManagementCluster(self, tr);
|
||||||
}));
|
}));
|
||||||
TraceEvent("BreakpointDeleteAfterFinish")
|
|
||||||
.detail("TenantName", self->tenantName)
|
|
||||||
.detail("PairName", self->pairName.present() ? self->pairName.get() : TenantName())
|
|
||||||
.detail("TenantId", self->tenantId);
|
|
||||||
|
|
||||||
return Void();
|
return Void();
|
||||||
}
|
}
|
||||||
|
@ -1517,9 +1494,7 @@ struct DeleteTenantImpl {
|
||||||
ACTOR template <class DB>
|
ACTOR template <class DB>
|
||||||
Future<Void> deleteTenant(Reference<DB> db, TenantName name) {
|
Future<Void> deleteTenant(Reference<DB> db, TenantName name) {
|
||||||
state DeleteTenantImpl<DB> impl(db, name);
|
state DeleteTenantImpl<DB> impl(db, name);
|
||||||
TraceEvent("BreakpointAttemptDelete").detail("Name", name);
|
|
||||||
wait(impl.run());
|
wait(impl.run());
|
||||||
TraceEvent("BreakpointDeleteSuccess").detail("Name", name).detail("TenantId", impl.tenantId);
|
|
||||||
return Void();
|
return Void();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1715,9 +1690,7 @@ Future<Void> configureTenant(Reference<DB> db,
|
||||||
TenantName name,
|
TenantName name,
|
||||||
std::map<Standalone<StringRef>, Optional<Value>> configurationParameters) {
|
std::map<Standalone<StringRef>, Optional<Value>> configurationParameters) {
|
||||||
state ConfigureTenantImpl<DB> impl(db, name, configurationParameters);
|
state ConfigureTenantImpl<DB> impl(db, name, configurationParameters);
|
||||||
TraceEvent("BreakpointAttemptConfigure").detail("Name", name);
|
|
||||||
wait(impl.run());
|
wait(impl.run());
|
||||||
TraceEvent("BreakpointConfigureSuccess").detail("Name", name);
|
|
||||||
return Void();
|
return Void();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1901,10 +1874,6 @@ struct RenameTenantImpl {
|
||||||
ACTOR static Future<Void> run(RenameTenantImpl* self) {
|
ACTOR static Future<Void> run(RenameTenantImpl* self) {
|
||||||
wait(self->ctx.runManagementTransaction(
|
wait(self->ctx.runManagementTransaction(
|
||||||
[self = self](Reference<typename DB::TransactionT> tr) { return markTenantsInRenamingState(self, tr); }));
|
[self = self](Reference<typename DB::TransactionT> tr) { return markTenantsInRenamingState(self, tr); }));
|
||||||
TraceEvent("BreakpointRenameAfterMark")
|
|
||||||
.detail("OldName", self->oldName)
|
|
||||||
.detail("NewName", self->newName)
|
|
||||||
.detail("TenantId", self->tenantId);
|
|
||||||
|
|
||||||
// Rename tenant on the data cluster
|
// Rename tenant on the data cluster
|
||||||
try {
|
try {
|
||||||
|
@ -1921,18 +1890,10 @@ struct RenameTenantImpl {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TraceEvent("BreakpointRenameAfterDataUpdate")
|
|
||||||
.detail("OldName", self->oldName)
|
|
||||||
.detail("NewName", self->newName)
|
|
||||||
.detail("TenantId", self->tenantId);
|
|
||||||
|
|
||||||
wait(self->ctx.runManagementTransaction([self = self](Reference<typename DB::TransactionT> tr) {
|
wait(self->ctx.runManagementTransaction([self = self](Reference<typename DB::TransactionT> tr) {
|
||||||
return finishRenameFromManagementCluster(self, tr);
|
return finishRenameFromManagementCluster(self, tr);
|
||||||
}));
|
}));
|
||||||
TraceEvent("BreakpointRenameAfterFinish")
|
|
||||||
.detail("OldName", self->oldName)
|
|
||||||
.detail("NewName", self->newName)
|
|
||||||
.detail("TenantId", self->tenantId);
|
|
||||||
return Void();
|
return Void();
|
||||||
}
|
}
|
||||||
Future<Void> run() { return run(this); }
|
Future<Void> run() { return run(this); }
|
||||||
|
@ -1941,12 +1902,7 @@ struct RenameTenantImpl {
|
||||||
ACTOR template <class DB>
|
ACTOR template <class DB>
|
||||||
Future<Void> renameTenant(Reference<DB> db, TenantName oldName, TenantName newName) {
|
Future<Void> renameTenant(Reference<DB> db, TenantName oldName, TenantName newName) {
|
||||||
state RenameTenantImpl<DB> impl(db, oldName, newName);
|
state RenameTenantImpl<DB> impl(db, oldName, newName);
|
||||||
TraceEvent("BreakpointAttemptRename").detail("OldName", oldName).detail("NewName", newName);
|
|
||||||
wait(impl.run());
|
wait(impl.run());
|
||||||
TraceEvent("BreakpointRenameSuccess")
|
|
||||||
.detail("OldName", oldName)
|
|
||||||
.detail("NewName", newName)
|
|
||||||
.detail("TenantId", impl.tenantId);
|
|
||||||
return Void();
|
return Void();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -186,7 +186,6 @@ struct TenantManagementConcurrencyWorkload : TestWorkload {
|
||||||
|
|
||||||
return Void();
|
return Void();
|
||||||
} catch (Error& e) {
|
} catch (Error& e) {
|
||||||
TraceEvent("BreakpointCreateFailed").error(e).detail("Tenant", tenant);
|
|
||||||
if (e.code() == error_code_tenant_removed) {
|
if (e.code() == error_code_tenant_removed) {
|
||||||
ASSERT(self->useMetacluster);
|
ASSERT(self->useMetacluster);
|
||||||
} else if (e.code() != error_code_tenant_already_exists && e.code() != error_code_cluster_no_capacity) {
|
} else if (e.code() != error_code_tenant_already_exists && e.code() != error_code_cluster_no_capacity) {
|
||||||
|
@ -215,7 +214,6 @@ struct TenantManagementConcurrencyWorkload : TestWorkload {
|
||||||
|
|
||||||
return Void();
|
return Void();
|
||||||
} catch (Error& e) {
|
} catch (Error& e) {
|
||||||
TraceEvent("BreakpointDeleteFailed").error(e).detail("Tenant", tenant);
|
|
||||||
if (e.code() != error_code_tenant_not_found) {
|
if (e.code() != error_code_tenant_not_found) {
|
||||||
TraceEvent(SevError, "DeleteTenantFailure").error(e).detail("TenantName", tenant);
|
TraceEvent(SevError, "DeleteTenantFailure").error(e).detail("TenantName", tenant);
|
||||||
}
|
}
|
||||||
|
@ -266,7 +264,6 @@ struct TenantManagementConcurrencyWorkload : TestWorkload {
|
||||||
|
|
||||||
return Void();
|
return Void();
|
||||||
} catch (Error& e) {
|
} catch (Error& e) {
|
||||||
TraceEvent("BreakpointConfigureFailed").error(e).detail("Tenant", tenant);
|
|
||||||
if (e.code() != error_code_tenant_not_found && e.code() != error_code_invalid_tenant_state) {
|
if (e.code() != error_code_tenant_not_found && e.code() != error_code_invalid_tenant_state) {
|
||||||
TraceEvent(SevError, "ConfigureTenantFailure").error(e).detail("TenantName", tenant);
|
TraceEvent(SevError, "ConfigureTenantFailure").error(e).detail("TenantName", tenant);
|
||||||
}
|
}
|
||||||
|
@ -292,7 +289,6 @@ struct TenantManagementConcurrencyWorkload : TestWorkload {
|
||||||
|
|
||||||
return Void();
|
return Void();
|
||||||
} catch (Error& e) {
|
} catch (Error& e) {
|
||||||
TraceEvent("BreakpointRenameFailed").error(e).detail("OldTenant", oldTenant).detail("NewTenant", newTenant);
|
|
||||||
if (e.code() == error_code_invalid_tenant_state || e.code() == error_code_tenant_removed ||
|
if (e.code() == error_code_invalid_tenant_state || e.code() == error_code_tenant_removed ||
|
||||||
e.code() == error_code_cluster_no_capacity) {
|
e.code() == error_code_cluster_no_capacity) {
|
||||||
ASSERT(self->useMetacluster);
|
ASSERT(self->useMetacluster);
|
||||||
|
|
|
@ -1211,13 +1211,9 @@ struct TenantManagementWorkload : TestWorkload {
|
||||||
wait(verifyTenantRenames(self, tenantRenames));
|
wait(verifyTenantRenames(self, tenantRenames));
|
||||||
// Check that using the wrong rename API fails depending on whether we are using a metacluster
|
// Check that using the wrong rename API fails depending on whether we are using a metacluster
|
||||||
ASSERT(self->useMetacluster == (operationType == OperationType::METACLUSTER));
|
ASSERT(self->useMetacluster == (operationType == OperationType::METACLUSTER));
|
||||||
TraceEvent("RenameTenantSuccessful").detail("TenantRenames", describe(tenantRenames));
|
|
||||||
return Void();
|
return Void();
|
||||||
} catch (Error& e) {
|
} catch (Error& e) {
|
||||||
if (e.code() == error_code_tenant_not_found) {
|
if (e.code() == error_code_tenant_not_found) {
|
||||||
TraceEvent("RenameTenantOldTenantNotFound")
|
|
||||||
.detail("TenantRenames", describe(tenantRenames))
|
|
||||||
.detail("CommitUnknownResult", unknownResult);
|
|
||||||
if (unknownResult) {
|
if (unknownResult) {
|
||||||
wait(verifyTenantRenames(self, tenantRenames));
|
wait(verifyTenantRenames(self, tenantRenames));
|
||||||
} else {
|
} else {
|
||||||
|
@ -1225,9 +1221,6 @@ struct TenantManagementWorkload : TestWorkload {
|
||||||
}
|
}
|
||||||
return Void();
|
return Void();
|
||||||
} else if (e.code() == error_code_tenant_already_exists) {
|
} else if (e.code() == error_code_tenant_already_exists) {
|
||||||
TraceEvent("RenameTenantNewTenantAlreadyExists")
|
|
||||||
.detail("TenantRenames", describe(tenantRenames))
|
|
||||||
.detail("CommitUnknownResult", unknownResult);
|
|
||||||
if (unknownResult) {
|
if (unknownResult) {
|
||||||
wait(verifyTenantRenames(self, tenantRenames));
|
wait(verifyTenantRenames(self, tenantRenames));
|
||||||
} else {
|
} else {
|
||||||
|
@ -1235,25 +1228,20 @@ struct TenantManagementWorkload : TestWorkload {
|
||||||
}
|
}
|
||||||
return Void();
|
return Void();
|
||||||
} else if (e.code() == error_code_special_keys_api_failure) {
|
} else if (e.code() == error_code_special_keys_api_failure) {
|
||||||
TraceEvent("RenameTenantNameConflict").detail("TenantRenames", describe(tenantRenames));
|
|
||||||
ASSERT(tenantOverlap);
|
ASSERT(tenantOverlap);
|
||||||
return Void();
|
return Void();
|
||||||
} else if (e.code() == error_code_invalid_metacluster_operation) {
|
} else if (e.code() == error_code_invalid_metacluster_operation) {
|
||||||
TraceEvent("RenameTenantInvalidMetaclusterOp").detail("TenantRenames", describe(tenantRenames));
|
|
||||||
ASSERT(operationType == OperationType::METACLUSTER != self->useMetacluster);
|
ASSERT(operationType == OperationType::METACLUSTER != self->useMetacluster);
|
||||||
return Void();
|
return Void();
|
||||||
} else if (e.code() == error_code_tenant_removed) {
|
} else if (e.code() == error_code_tenant_removed) {
|
||||||
TraceEvent("RenameTenantTenantRemoved").detail("TenantRenames", describe(tenantRenames));
|
|
||||||
ASSERT(operationType == OperationType::METACLUSTER);
|
ASSERT(operationType == OperationType::METACLUSTER);
|
||||||
return Void();
|
return Void();
|
||||||
} else if (e.code() == error_code_invalid_tenant_state) {
|
} else if (e.code() == error_code_invalid_tenant_state) {
|
||||||
TraceEvent("RenameTenantInvalidTenantState").detail("TenantRenames", describe(tenantRenames));
|
|
||||||
ASSERT(operationType == OperationType::METACLUSTER);
|
ASSERT(operationType == OperationType::METACLUSTER);
|
||||||
return Void();
|
return Void();
|
||||||
} else if (e.code() == error_code_cluster_no_capacity) {
|
} else if (e.code() == error_code_cluster_no_capacity) {
|
||||||
// This error should only occur on metacluster due to the multi-stage process.
|
// This error should only occur on metacluster due to the multi-stage process.
|
||||||
// Having temporary tenants may exceed capacity, so we disallow the rename.
|
// Having temporary tenants may exceed capacity, so we disallow the rename.
|
||||||
TraceEvent("RenameTenanClusterNoCapacity").detail("TenantRenames", describe(tenantRenames));
|
|
||||||
ASSERT(operationType == OperationType::METACLUSTER);
|
ASSERT(operationType == OperationType::METACLUSTER);
|
||||||
return Void();
|
return Void();
|
||||||
} else {
|
} else {
|
||||||
|
@ -1262,7 +1250,6 @@ struct TenantManagementWorkload : TestWorkload {
|
||||||
// until it's successful. Next loop around may throw error because it's
|
// until it's successful. Next loop around may throw error because it's
|
||||||
// already been moved, so account for that and update internal map as needed.
|
// already been moved, so account for that and update internal map as needed.
|
||||||
if (e.code() == error_code_commit_unknown_result) {
|
if (e.code() == error_code_commit_unknown_result) {
|
||||||
TraceEvent("RenameTenantCommitUnknownResult").error(e);
|
|
||||||
ASSERT(operationType != OperationType::MANAGEMENT_DATABASE &&
|
ASSERT(operationType != OperationType::MANAGEMENT_DATABASE &&
|
||||||
operationType != OperationType::METACLUSTER);
|
operationType != OperationType::METACLUSTER);
|
||||||
unknownResult = true;
|
unknownResult = true;
|
||||||
|
|
Loading…
Reference in New Issue