[improve][pip] PIP-449: Improve metadata sync to have exclusions in syncing specific config matching regex pattern across onprem and cloud clusters #25035
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
The pulsar metadata sync does not have a way to exclude specific config from syncing across clusters. For example, a cluster need to have a separate config in on-prem and cloud for it to function correctly for geo-replication. Syncing the cluster config creates issues in geo-replication. Enhance pulsar metadata synchronizer to exclude cluster config from syncing across clusters.
Apply the exclusion in a way that a specific destination cluster can ignore a config sync based on the pattern set at the destination cluster level. Pulsar metadata synchronizer will publish the metadata change event to the destination cluster, which may or may not exclude the event depending on the exclusion pattern set in the destination broker config.
Multiple exclusions patterns can be configured and sync would be excluded if any of the patterns match.
Modifications
metadataSyncEventExclusionsto exclude sync. Provide regex pattern eg /admin/clusters/.*, /admin/(?!.test). to exclude the config sync event.metadataSyncEventExclusionsVerifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-complete