-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Polices On Topic #2688
Comments
This change will cause more load on zookeeper. For each topic loaded, we would have to do a read for the policy of that topic when loading the topic policy, even if no topic policy exists. How does the broker get notified of updated to the policy for a topic? If we add a watcher, that's a watcher per topic. We should consider if there's another way of doing this without placing more load on ZK, such as in a 'system' topic. |
Yes, this is a very necessary concern. I think 'system' topic is an excellent solution.
For 'system' topic design. I'm not sure the 'system' topic border.
I'm prone to 1 or 2, for 3 too much topic will be created. @ivankelly Can you give me some idea more ? Thanks |
I would put it at the namespace level, so 2. It would be good to have a generic model for system topics, as currently it would require you wiring up something yourself. Maybe it would be better to put it at the managed ledger layer also, since if we put it at the pulsar level we would have a circular dependency of sorts. |
@ivankelly I am a bit confused about using managed ledger. managed ledger doesn't have tailing facility, how do you propagate the policy changes using managed ledger? |
You shouldn't need to propagate. When you update the policy, you're hitting the broker that owns the topic. |
I am lost now. Isn't the existence of system topic to address the concern of zookeeper notifications? so we convert the zookeeper notifications, to consume from system topic. penghui's previous comment was using system topic, which is making sense, since pulsar already has producer and consumer. but in your last comment, you suggest using mledger to avoid circular dependency, then my question is "how is possible that the other brokers get notified with policy changes, because mledger doesn't have tailing facility". |
From what I can tell, system topics don't actually exist as an actual concept in pulsar, they're just normal topics. But as a conceptual concept, they don't exist just to replace notifications. They also exist as a place to store metadata which can scale. Ok, so, to recap where the suggestion to use managed ledger came from... The first suggestion was to put topic policies in zookeeper. This was discarded because of zookeeper scale issues. So then it was suggested to use a system topic in pulsar. I'm questioning whether we should use a topic for policies on topics. What happens if the topic that contains the policy so has a topic policy? Maybe we need to prevent system topics from having topic level policies. Otherwise, we put the "system topics" a lower layer and we wouldn't even have this problem. I suggested managed ledger, but dlog would also work here if we want notifications. But stepping back, what I really want is that we define what system topics are and make them a reusable concept within the system. |
okay. if system topic is to store metadata, isn't it overlapped with the goal of building table service for metadata storage. if you just use a pure log to store metadata, we still have too much to build and most of the work is overlapped with the goal of table service. so I think we should first target system topic as a changelog of what's happening within namespace, rather than making it to replace zookeeper to store metadata.
good point. I see it now.
I think we should just consolidate managed ledger and dlog into one library and use it across the place. The storage layer already provide tailing as notifications, which pulsar should leverage for "system topics" here, maybe "readonly broker" in future, and even the sql segment reader optimization. |
+1 to this. |
@codelipenghui I moved this task to 2.4.0 since it seems that we need address system topic first. |
@codelipenghui @merlimat @ivankelly After talking to a lot of users, users would like to have the ability to override the policy at namespace level. Since Pulsar doesn't support this feature, it forces the users to create many namespaces just for the ability to configure the policy for different topics. I think we should just go ahead to implement the topic level policy without waiting for the system topic. If the concern is about zk access, we can think of reducing the zk access or having a flag to control whether to enable this feature or not and give warnings to people to not over-use this feature. Thoughts? |
### Motivation Master Issue: apache#2688 Add Topic level policy support for message TTL. ### Modifications Support set/get/remove Message TTL on topic level. ### Verifying this change This change added tests and can be verified as follows: - *Added Unit test to verify set/get/remove message TTL at Topic level work as expected when Topic level policy is enabled/disabled* - *Added test case in PersistentTopicE2ETest to verify Topic level message TTL is used when set and will fall back to namespace message TTL if Topic level message TTL is removed.*
Master Issue: apache#2688 ### Motivation support topic level delayed delivery policy ### Modifications Support set/get/remove delayed delivery policy on topic level. ### Verifying this change Added Unit test to verify set/get/remove delayed delivery policy at Topic level work as expected when Topic level policy is enabled/disabled - org.apache.pulsar.broker.admin.AdminApiDelayedDelivery#testEnableAndDisableTopicDelayedDelivery - org.apache.pulsar.broker.admin.AdminApiDelayedDelivery#testEnableTopicDelayedDelivery
Link [https://github.com/apache/pulsar/issues/7757](https://github.com/apache/pulsar/issues/7757) and master issue [https://github.com/apache/pulsar/issues/2688](https://github.com/apache/pulsar/issues/2688) ### Motivation Support set/get/remove persistence policies on topic level. ### Verifying this change new unit test added.
Link [https://github.com/apache/pulsar/issues/7758](https://github.com/apache/pulsar/issues/7758) and master issue [https://github.com/apache/pulsar/issues/2688](https://github.com/apache/pulsar/issues/2688) ### Motivation Support set/get/remove maxProducers on a topic level.
### Motivation Master Issue: apache#2688 Add Topic level policy support for message TTL. ### Modifications Support set/get/remove Message TTL on topic level. ### Verifying this change This change added tests and can be verified as follows: - *Added Unit test to verify set/get/remove message TTL at Topic level work as expected when Topic level policy is enabled/disabled* - *Added test case in PersistentTopicE2ETest to verify Topic level message TTL is used when set and will fall back to namespace message TTL if Topic level message TTL is removed.*
Master Issue: apache#2688 ### Motivation support topic level delayed delivery policy ### Modifications Support set/get/remove delayed delivery policy on topic level. ### Verifying this change Added Unit test to verify set/get/remove delayed delivery policy at Topic level work as expected when Topic level policy is enabled/disabled - org.apache.pulsar.broker.admin.AdminApiDelayedDelivery#testEnableAndDisableTopicDelayedDelivery - org.apache.pulsar.broker.admin.AdminApiDelayedDelivery#testEnableTopicDelayedDelivery
Link [https://github.com/apache/pulsar/issues/7757](https://github.com/apache/pulsar/issues/7757) and master issue [https://github.com/apache/pulsar/issues/2688](https://github.com/apache/pulsar/issues/2688) ### Motivation Support set/get/remove persistence policies on topic level. ### Verifying this change new unit test added.
Link [https://github.com/apache/pulsar/issues/7758](https://github.com/apache/pulsar/issues/7758) and master issue [https://github.com/apache/pulsar/issues/2688](https://github.com/apache/pulsar/issues/2688) ### Motivation Support set/get/remove maxProducers on a topic level.
### Motivation Master Issue: apache#2688 Add Topic level policy support for message TTL. ### Modifications Support set/get/remove Message TTL on topic level. ### Verifying this change This change added tests and can be verified as follows: - *Added Unit test to verify set/get/remove message TTL at Topic level work as expected when Topic level policy is enabled/disabled* - *Added test case in PersistentTopicE2ETest to verify Topic level message TTL is used when set and will fall back to namespace message TTL if Topic level message TTL is removed.*
Master Issue: apache#2688 ### Motivation support topic level delayed delivery policy ### Modifications Support set/get/remove delayed delivery policy on topic level. ### Verifying this change Added Unit test to verify set/get/remove delayed delivery policy at Topic level work as expected when Topic level policy is enabled/disabled - org.apache.pulsar.broker.admin.AdminApiDelayedDelivery#testEnableAndDisableTopicDelayedDelivery - org.apache.pulsar.broker.admin.AdminApiDelayedDelivery#testEnableTopicDelayedDelivery
Link [https://github.com/apache/pulsar/issues/7757](https://github.com/apache/pulsar/issues/7757) and master issue [https://github.com/apache/pulsar/issues/2688](https://github.com/apache/pulsar/issues/2688) ### Motivation Support set/get/remove persistence policies on topic level. ### Verifying this change new unit test added.
Link [https://github.com/apache/pulsar/issues/7758](https://github.com/apache/pulsar/issues/7758) and master issue [https://github.com/apache/pulsar/issues/2688](https://github.com/apache/pulsar/issues/2688) ### Motivation Support set/get/remove maxProducers on a topic level.
### Motivation Master Issue: apache#2688 Add Topic level policy support for message TTL. ### Modifications Support set/get/remove Message TTL on topic level. ### Verifying this change This change added tests and can be verified as follows: - *Added Unit test to verify set/get/remove message TTL at Topic level work as expected when Topic level policy is enabled/disabled* - *Added test case in PersistentTopicE2ETest to verify Topic level message TTL is used when set and will fall back to namespace message TTL if Topic level message TTL is removed.*
Master Issue: apache#2688 ### Motivation support topic level delayed delivery policy ### Modifications Support set/get/remove delayed delivery policy on topic level. ### Verifying this change Added Unit test to verify set/get/remove delayed delivery policy at Topic level work as expected when Topic level policy is enabled/disabled - org.apache.pulsar.broker.admin.AdminApiDelayedDelivery#testEnableAndDisableTopicDelayedDelivery - org.apache.pulsar.broker.admin.AdminApiDelayedDelivery#testEnableTopicDelayedDelivery
Link [https://github.com/apache/pulsar/issues/7757](https://github.com/apache/pulsar/issues/7757) and master issue [https://github.com/apache/pulsar/issues/2688](https://github.com/apache/pulsar/issues/2688) ### Motivation Support set/get/remove persistence policies on topic level. ### Verifying this change new unit test added.
Link [https://github.com/apache/pulsar/issues/7758](https://github.com/apache/pulsar/issues/7758) and master issue [https://github.com/apache/pulsar/issues/2688](https://github.com/apache/pulsar/issues/2688) ### Motivation Support set/get/remove maxProducers on a topic level.
Fix [https://github.com/apache/pulsar/issues/7759](https://github.com/apache/pulsar/issues/7759), and master issue [https://github.com/apache/pulsar/issues/2688](https://github.com/apache/pulsar/issues/2688) ### Motivation Support set/get/remove maxConsumers on a topic level.
Fix [https://github.com/apache/pulsar/issues/7759](https://github.com/apache/pulsar/issues/7759), and master issue [https://github.com/apache/pulsar/issues/2688](https://github.com/apache/pulsar/issues/2688) ### Motivation Support set/get/remove maxConsumers on a topic level.
All topic policies are ready for 2.7.0. Thanks to all contributors work together to complete the great feature. |
Fixes apache#8899 Update the description of the newly added topic-level policies in apache#2688. This pr fixes apache#9161, the branch of which was deleted incorrectly.
This is the master ticket for tracking all the tasks for polices on topic
The text was updated successfully, but these errors were encountered: