remove debug traces

This commit is contained in:
Jon Fu 2022-08-11 14:28:05 -07:00
parent c1ce4b361b
commit fe350f4514
3 changed files with 0 additions and 61 deletions

View File

@ -1318,9 +1318,7 @@ struct CreateTenantImpl {
ACTOR template <class DB>
Future<Void> createTenant(Reference<DB> db, TenantName name, TenantMapEntry tenantEntry) {
state CreateTenantImpl<DB> impl(db, name, tenantEntry);
TraceEvent("BreakpointAttemptCreate").detail("Name", name);
wait(impl.run());
TraceEvent("BreakpointCreateSuccess").detail("Name", name);
return Void();
}
@ -1461,26 +1459,14 @@ struct DeleteTenantImpl {
// Get information about the tenant and where it is assigned
bool deletionInProgress = wait(self->ctx.runManagementTransaction(
[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) {
wait(self->ctx.runDataClusterTransaction(
[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) {
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
@ -1496,18 +1482,9 @@ struct DeleteTenantImpl {
return pairDelete && TenantAPI::deleteTenantTransaction(
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) {
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();
}
@ -1517,9 +1494,7 @@ struct DeleteTenantImpl {
ACTOR template <class DB>
Future<Void> deleteTenant(Reference<DB> db, TenantName name) {
state DeleteTenantImpl<DB> impl(db, name);
TraceEvent("BreakpointAttemptDelete").detail("Name", name);
wait(impl.run());
TraceEvent("BreakpointDeleteSuccess").detail("Name", name).detail("TenantId", impl.tenantId);
return Void();
}
@ -1715,9 +1690,7 @@ Future<Void> configureTenant(Reference<DB> db,
TenantName name,
std::map<Standalone<StringRef>, Optional<Value>> configurationParameters) {
state ConfigureTenantImpl<DB> impl(db, name, configurationParameters);
TraceEvent("BreakpointAttemptConfigure").detail("Name", name);
wait(impl.run());
TraceEvent("BreakpointConfigureSuccess").detail("Name", name);
return Void();
}
@ -1901,10 +1874,6 @@ struct RenameTenantImpl {
ACTOR static Future<Void> run(RenameTenantImpl* self) {
wait(self->ctx.runManagementTransaction(
[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
try {
@ -1921,18 +1890,10 @@ struct RenameTenantImpl {
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) {
return finishRenameFromManagementCluster(self, tr);
}));
TraceEvent("BreakpointRenameAfterFinish")
.detail("OldName", self->oldName)
.detail("NewName", self->newName)
.detail("TenantId", self->tenantId);
return Void();
}
Future<Void> run() { return run(this); }
@ -1941,12 +1902,7 @@ struct RenameTenantImpl {
ACTOR template <class DB>
Future<Void> renameTenant(Reference<DB> db, TenantName oldName, TenantName newName) {
state RenameTenantImpl<DB> impl(db, oldName, newName);
TraceEvent("BreakpointAttemptRename").detail("OldName", oldName).detail("NewName", newName);
wait(impl.run());
TraceEvent("BreakpointRenameSuccess")
.detail("OldName", oldName)
.detail("NewName", newName)
.detail("TenantId", impl.tenantId);
return Void();
}

View File

@ -186,7 +186,6 @@ struct TenantManagementConcurrencyWorkload : TestWorkload {
return Void();
} catch (Error& e) {
TraceEvent("BreakpointCreateFailed").error(e).detail("Tenant", tenant);
if (e.code() == error_code_tenant_removed) {
ASSERT(self->useMetacluster);
} 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();
} catch (Error& e) {
TraceEvent("BreakpointDeleteFailed").error(e).detail("Tenant", tenant);
if (e.code() != error_code_tenant_not_found) {
TraceEvent(SevError, "DeleteTenantFailure").error(e).detail("TenantName", tenant);
}
@ -266,7 +264,6 @@ struct TenantManagementConcurrencyWorkload : TestWorkload {
return Void();
} 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) {
TraceEvent(SevError, "ConfigureTenantFailure").error(e).detail("TenantName", tenant);
}
@ -292,7 +289,6 @@ struct TenantManagementConcurrencyWorkload : TestWorkload {
return Void();
} 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 ||
e.code() == error_code_cluster_no_capacity) {
ASSERT(self->useMetacluster);

View File

@ -1211,13 +1211,9 @@ struct TenantManagementWorkload : TestWorkload {
wait(verifyTenantRenames(self, tenantRenames));
// Check that using the wrong rename API fails depending on whether we are using a metacluster
ASSERT(self->useMetacluster == (operationType == OperationType::METACLUSTER));
TraceEvent("RenameTenantSuccessful").detail("TenantRenames", describe(tenantRenames));
return Void();
} catch (Error& e) {
if (e.code() == error_code_tenant_not_found) {
TraceEvent("RenameTenantOldTenantNotFound")
.detail("TenantRenames", describe(tenantRenames))
.detail("CommitUnknownResult", unknownResult);
if (unknownResult) {
wait(verifyTenantRenames(self, tenantRenames));
} else {
@ -1225,9 +1221,6 @@ struct TenantManagementWorkload : TestWorkload {
}
return Void();
} else if (e.code() == error_code_tenant_already_exists) {
TraceEvent("RenameTenantNewTenantAlreadyExists")
.detail("TenantRenames", describe(tenantRenames))
.detail("CommitUnknownResult", unknownResult);
if (unknownResult) {
wait(verifyTenantRenames(self, tenantRenames));
} else {
@ -1235,25 +1228,20 @@ struct TenantManagementWorkload : TestWorkload {
}
return Void();
} else if (e.code() == error_code_special_keys_api_failure) {
TraceEvent("RenameTenantNameConflict").detail("TenantRenames", describe(tenantRenames));
ASSERT(tenantOverlap);
return Void();
} else if (e.code() == error_code_invalid_metacluster_operation) {
TraceEvent("RenameTenantInvalidMetaclusterOp").detail("TenantRenames", describe(tenantRenames));
ASSERT(operationType == OperationType::METACLUSTER != self->useMetacluster);
return Void();
} else if (e.code() == error_code_tenant_removed) {
TraceEvent("RenameTenantTenantRemoved").detail("TenantRenames", describe(tenantRenames));
ASSERT(operationType == OperationType::METACLUSTER);
return Void();
} else if (e.code() == error_code_invalid_tenant_state) {
TraceEvent("RenameTenantInvalidTenantState").detail("TenantRenames", describe(tenantRenames));
ASSERT(operationType == OperationType::METACLUSTER);
return Void();
} else if (e.code() == error_code_cluster_no_capacity) {
// This error should only occur on metacluster due to the multi-stage process.
// Having temporary tenants may exceed capacity, so we disallow the rename.
TraceEvent("RenameTenanClusterNoCapacity").detail("TenantRenames", describe(tenantRenames));
ASSERT(operationType == OperationType::METACLUSTER);
return Void();
} else {
@ -1262,7 +1250,6 @@ struct TenantManagementWorkload : TestWorkload {
// 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.
if (e.code() == error_code_commit_unknown_result) {
TraceEvent("RenameTenantCommitUnknownResult").error(e);
ASSERT(operationType != OperationType::MANAGEMENT_DATABASE &&
operationType != OperationType::METACLUSTER);
unknownResult = true;