Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete global namespace #2867

Merged

Conversation

alexshtin
Copy link
Member

@alexshtin alexshtin commented May 19, 2022

What changed?
Add support to delete global namespace.

Why?
Some checks needs to be added to support deletion of global namespace.

How did you test it?
Manually in local "global" cluster.

Potential risks
No risks.

Is hotfix candidate?
No.

Notes on delete global namespace

This will eventually go to the docs.

Namespace deletion is not automatically replicated. This works as extra safety net and global namespaces must be deleted manually in every cluster. Rename is not propagated either because it happens after changing of namespace state.

Namespace should be deleted in active cluster first. Otherwise deletion in stand by cluster might take longer because running workflows will be resurrected from active cluster.

See #2855 for more details on deletion of workflow execution.

@alexshtin alexshtin requested a review from a team as a code owner May 19, 2022 04:36
@yiminc yiminc requested a review from yycptt May 20, 2022 04:19
Copy link
Member

@yycptt yycptt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The task processing part LGTM. @yux0 Would you mind go over the replication part?

return e.namespaceEntry.ReplicationPolicy() == namespace.ReplicationPolicyMultiCluster
return e.namespaceEntry.ReplicationPolicy() == namespace.ReplicationPolicyMultiCluster &&
// Don't replicate workflow executions in deleted namespace.
e.namespaceEntry.State() != enumspb.NAMESPACE_STATE_DELETED
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @yux0

}

if err != nil {
if _, isNotFound := err.(*serviceerror.NamespaceNotFound); isNotFound {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can we define a util function for this check? maybe in the common package?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no. I am against this. go codders should suffer from all go features!

@alexshtin alexshtin force-pushed the feature/delete-global-namespace branch from a4a3a8c to 2bb0a49 Compare May 27, 2022 23:38
@alexshtin alexshtin merged commit 7af6cda into temporalio:master May 31, 2022
@alexshtin alexshtin deleted the feature/delete-global-namespace branch May 31, 2022 22:08
Sushisource pushed a commit to Sushisource/temporal that referenced this pull request Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants