Repository navigation
Add RPC definitions for namespace soft deletion and restoration - #899
awln-temporal wants to merge 2 commits into
Conversation
|
|
||
| message SoftDeleteNamespaceRequest { | ||
| // Only one of namespace or namespace_id must be specified to identify namespace. | ||
| string namespace = 1; |
There was a problem hiding this comment.
cc @yycptt should we still include this as an option?
c21097c to
e0de7a7
Compare
| message RestoreNamespaceResponse { | ||
| } | ||
|
|
||
| message DescribeNamespaceRestoreRequest { |
There was a problem hiding this comment.
Another option here is RestoreNamespaceRequest returning a job token(maybe the runID of restore workflow) and DescribeNamespaceRestoreRequest passing that job token. That will help us query the status of multiple past operations. But maybe that is not very important since we only have on Restore operation per namespace at a time.
There was a problem hiding this comment.
yeah, I figured most of the time you wouldn't care about previous restore workflows. If you think this would be useful we can include this in another change.
| int64 total_execution_count = 6; | ||
| // Executions processed on every cluster. | ||
| int64 processed_execution_count = 7; | ||
| google.protobuf.Timestamp estimated_completion_time = 8; |
There was a problem hiding this comment.
I wonder if server should calculate this. Can the client calculate this based on start_time, current_time and the progress?
There was a problem hiding this comment.
yeah it can, I just included it so client wouldn't need to do this, and I suppose mostly irrelevant but it'd be calculated based off the clock of the server.
If it's something that might be useful to OSS users I figured might as well just have server provide this.
What changed?
Add RPC definitions for namespace soft deletion and restoration.
Why?
Add new feature for namespace soft deletion. Supports two operations: marking a namespace as soft deleted, and restoring the namespace back to REGISTERED state.
When a namespace is in soft deleted state, existing tasks will get dropped, and any inbound API calls and outbound task dispatching will be invalidated, so no executions can progress.
To recover a namespace back to REGISTERED state and allow executions to update, an Operator API RestoreNamespace will be added that will mark the namespace state as REGISTERED, then start a system workflow to conduct a batch refresh of tasks for all executions in the namespace, across all replicated clusters listed in the NamespaceReplicationConfig.
This is the PR required to unblock server feature development.
Breaking changes
N/A
Server PR
N/A