codelipenghui commented on code in PR #24368: URL: https://github.com/apache/pulsar/pull/24368#discussion_r2128210551
########## pip/pip-422.md: ########## @@ -0,0 +1,101 @@ +# PIP-422: Support global topic-level policy: replicated clusters and new API to delete topic-level policies + +# Background knowledge + +Users have two choices when configuring the metadata store when using the feature Geo-Replication: shared or not. +All clusters share data that are stored in the global config metadata store if users choose to use a shared metadata store. +By the way, the share config metadata store is often built across multiple zones/regions to ensure fault tolerance. + +Since the data that is stored in the shared metadata store contains the following pulsar resources: tenants, namespaces, partitioned topics, +the Admin API can not be used to delete these pulsar resources for a single cluster. +Pulsar has a feature that is used to delete namespace-level resources for a specific cluster when using a shared metadata store, it works as follows: +- The original namespace-level policy that named `replicated clusters` contains two clusters `c1` and `c2`. +- The topics under the cluster `c1` will be deleted automatically when users remove `c1` from the namespace-level policy. + +The feature above is very useful in the following scenarios: +- Transfer a namespace from an old cluster to a new cluster: at last, the namespace should be deleted from the old cluster. +- Delete topics: since Pulsar does not allow deleting topics when enabled Geo-Replication, users should disable replication first. + +# Motivation + +When using a shared metadata store and enabling Geo-Replication, there is no mechanism for the following scenarios: +- Transfer a partitioned topic from an old cluster to a new cluster. +- Delete a partitioned topic from a specified cluster. + +# Goals & Designs + +Add two new APIs +- `pulsar-admin topicPolicies -c <clusters> --g <topic>` Review Comment: ```suggestion - `pulsar-admin topicPolicies --set-replication-cluster -c <clusters> --g <topic>` ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
