Skip to content

Commit 955c465

Browse files
dlg99lhotari
authored andcommitted
[fix] chore: remove unused preciseTopicPublishRateLimiterEnable (apache#24249)
(cherry picked from commit 0cfed94)
1 parent 0f7aace commit 955c465

File tree

6 files changed

+0
-20
lines changed

6 files changed

+0
-20
lines changed

conf/broker.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,6 @@ unblockStuckSubscriptionEnabled=false
389389
# it uses more CPU to perform frequent check. (Disable publish throttling with value 0)
390390
topicPublisherThrottlingTickTimeMillis=10
391391

392-
# Enable precise rate limit for topic publish
393-
preciseTopicPublishRateLimiterEnable=false
394-
395392
# Tick time to schedule task that checks broker publish rate limiting across all topics
396393
# Reducing to lower value can give more accuracy while throttling publish but
397394
# it uses more CPU to perform frequent check. (Disable publish throttling with value 0)

conf/standalone.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,6 @@ keySharedLookAheadMsgInReplayThresholdPerSubscription=20000
260260
# it uses more CPU to perform frequent check. (Disable publish throttling with value 0)
261261
topicPublisherThrottlingTickTimeMillis=2
262262

263-
# Enable precise rate limit for topic publish
264-
preciseTopicPublishRateLimiterEnable=false
265-
266263
# Tick time to schedule task that checks broker publish rate limiting across all topics
267264
# Reducing to lower value can give more accuracy while throttling publish but
268265
# it uses more CPU to perform frequent check. (Disable publish throttling with value 0)

pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,11 +1041,6 @@ The max allowed delay for delayed delivery (in milliseconds). If the broker rece
10411041
+ "it uses more CPU to perform frequent check. (Disable publish throttling with value 0)"
10421042
)
10431043
private int topicPublisherThrottlingTickTimeMillis = 10;
1044-
@FieldContext(
1045-
category = CATEGORY_SERVER,
1046-
doc = "Enable precise rate limit for topic publish"
1047-
)
1048-
private boolean preciseTopicPublishRateLimiterEnable = false;
10491044

10501045
@FieldContext(
10511046
category = CATEGORY_SERVER,

pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ public abstract class AbstractTopic implements Topic, TopicPolicyListener {
135135
protected volatile PublishRateLimiter topicPublishRateLimiter;
136136
protected volatile ResourceGroupPublishLimiter resourceGroupPublishLimiter;
137137

138-
protected boolean preciseTopicPublishRateLimitingEnable;
139-
140138
@Getter
141139
protected boolean resourceGroupRateLimitingEnabled;
142140

@@ -193,7 +191,6 @@ public AbstractTopic(String topic, BrokerService brokerService) {
193191
updateTopicPolicyByBrokerConfig();
194192

195193
this.lastActive = System.nanoTime();
196-
this.preciseTopicPublishRateLimitingEnable = config.isPreciseTopicPublishRateLimiterEnable();
197194
topicPublishRateLimiter = new PublishRateLimiterImpl(brokerService.getPulsar().getMonotonicClock());
198195
updateActiveRateLimiters();
199196

pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ public class BrokerService implements Closeable {
323323
private Channel listenChannel;
324324
private Channel listenChannelTls;
325325

326-
private boolean preciseTopicPublishRateLimitingEnable;
327326
private BrokerInterceptor interceptor;
328327
private final EntryFilterProvider entryFilterProvider;
329328
private TopicFactory topicFactory;
@@ -339,8 +338,6 @@ public BrokerService(PulsarService pulsar, EventLoopGroup eventLoopGroup) throws
339338
this.clock = pulsar.getClock();
340339
this.dynamicConfigurationMap = prepareDynamicConfigurationMap();
341340
this.brokerPublishRateLimiter = new PublishRateLimiterImpl(pulsar.getMonotonicClock());
342-
this.preciseTopicPublishRateLimitingEnable =
343-
pulsar.getConfiguration().isPreciseTopicPublishRateLimiterEnable();
344341
this.dispatchRateLimiterFactory = createDispatchRateLimiterFactory(pulsar.getConfig());
345342
this.managedLedgerStorage = pulsar.getManagedLedgerStorage();
346343
this.keepAliveIntervalSeconds = pulsar.getConfiguration().getKeepAliveIntervalSeconds();

pulsar-broker/src/test/java/org/apache/pulsar/broker/service/TopicPublishRateThrottleTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ protected void cleanup() throws Exception {
4747
@Test
4848
public void testProducerBlockedByPrecisTopicPublishRateLimiting() throws Exception {
4949
PublishRate publishRate = new PublishRate(1,10);
50-
conf.setPreciseTopicPublishRateLimiterEnable(true);
5150
conf.setMaxPendingPublishRequestsPerConnection(0);
5251
super.baseSetup();
5352
admin.namespaces().setPublishRate("prop/ns-abc", publishRate);
@@ -93,7 +92,6 @@ public void testSystemTopicPublishNonBlock() throws Exception {
9392
@Test
9493
public void testPrecisTopicPublishRateLimitingProduceRefresh() throws Exception {
9594
PublishRate publishRate = new PublishRate(1,10);
96-
conf.setPreciseTopicPublishRateLimiterEnable(true);
9795
conf.setMaxPendingPublishRequestsPerConnection(0);
9896
super.baseSetup();
9997
admin.namespaces().setPublishRate("prop/ns-abc", publishRate);
@@ -129,7 +127,6 @@ public void testPrecisTopicPublishRateLimitingProduceRefresh() throws Exception
129127

130128
@Test
131129
public void testBrokerLevelPublishRateDynamicUpdate() throws Exception{
132-
conf.setPreciseTopicPublishRateLimiterEnable(true);
133130
conf.setMaxPendingPublishRequestsPerConnection(0);
134131
super.baseSetup();
135132
final String topic = "persistent://prop/ns-abc/testMultiLevelPublishRate";

0 commit comments

Comments
 (0)