You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2019/05/23 09:40:05 UTC
[pulsar] branch master updated: `rereplicationEntryBatchSize` should be smaller than `maxPendingReadR… (#4314)
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new f824410 `rereplicationEntryBatchSize` should be smaller than `maxPendingReadR… (#4314)
f824410 is described below
commit f82441018ac21a81f2bbbf8a11e5d29c22a3197b
Author: Yong Zhang <zh...@gmail.com>
AuthorDate: Thu May 23 17:39:57 2019 +0800
`rereplicationEntryBatchSize` should be smaller than `maxPendingReadR… (#4314)
Fixes #4213
---
conf/bookkeeper.conf | 2 +-
.../src/main/java/org/apache/pulsar/PulsarBrokerStarter.java | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/conf/bookkeeper.conf b/conf/bookkeeper.conf
index da68a3d..4517859 100644
--- a/conf/bookkeeper.conf
+++ b/conf/bookkeeper.conf
@@ -224,7 +224,7 @@ maxPendingAddRequestsPerThread=10000
auditorPeriodicBookieCheckInterval=86400
# The number of entries that a replication will rereplicate in parallel.
-rereplicationEntryBatchSize=5000
+rereplicationEntryBatchSize=100
# Auto-replication
# The grace period, in seconds, that the replication worker waits before fencing and
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java
index 8f291ea..b582bb5 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java
@@ -106,6 +106,11 @@ public class PulsarBrokerStarter {
log.error("Malformed configuration file: {}", bookieConfigFile, e);
throw new IllegalArgumentException("Malformed configuration file");
}
+
+ if (bookieConf.getMaxPendingReadRequestPerThread() < bookieConf.getRereplicationEntryBatchSize()) {
+ throw new IllegalArgumentException(
+ "rereplicationEntryBatchSize should be smaller than " + "maxPendingReadRequestPerThread");
+ }
return bookieConf;
}