poorbarcode commented on code in PR #24368: URL: https://github.com/apache/pulsar/pull/24368#discussion_r2122478175
########## pip/pip-422.md: ########## @@ -0,0 +1,103 @@ +# PIP-422: Support global topic-level policy: replicated clusters and new API to delete topic-level policies + +# Background knowledge + +Users have two choices of config metadata store when using the feature Geo-Replication: shared or not. +All clusters share data that are stored in global config metadata store if users choose to use a shared metadata store. +By the way, the share config metadata store often is build crossing multi zone/region to confirm fault tolerance. + +Since the data that are stored in the shared metadata store contains the following pulsar resources: tenants, namespaces, partitioned topic, +the Admin API can not be used to delete these pulsar resources for a single cluster. +Pulsar has a feature that used to delete namespace level resources for a specify 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 very useful at the following scenarios: +- Transfer a namespace from a 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 shared metadata store and enabled Geo-Replication, there is no mechanism for the following scenarios: +- Transfer a partitioned topic from a old cluster to a new cluster. +- Delete a partitioned topic form a specify cluster. + +Passed solutions: +1. Disable namespace-level Geo-Replication then delete the partitioned topic: this will trigger a deletion for other topics, which is not expected. +2. Disable topic-level Geo-Replication under each cluster, and delete the partitioned topic by Admin API: it will delete the shared partitioned topic metadata, which was also deleted from another cluster. +3. Disable topic-level Geo-Replication under each cluster, and delete the sub-topics manually by Admin API: this is the best solution without the current PIP, the defect is that the schema data and topic-level policies are still there. Review Comment: Moved them into `#Alternatives` -- 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]
