You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/10/14 10:05:54 UTC
[GitHub] [pulsar] 315157973 opened a new pull request #8261: Support limits the max tenants of the Pulsar cluster
315157973 opened a new pull request #8261:
URL: https://github.com/apache/pulsar/pull/8261
Fixes #8223
### Motivation
Support limits the max tenants of the Pulsar cluster. When the tenants reach the max tenants of the cluster, the broker should reject the new tenant request.
### Modifications
Add maxTenants=0 in the broker.conf and don't limit by default.
### Verifying this change
TenantTest#testMaxTenant
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] 315157973 commented on pull request #8261: Support limits the max tenants of the Pulsar cluster
Posted by GitBox <gi...@apache.org>.
315157973 commented on pull request #8261:
URL: https://github.com/apache/pulsar/pull/8261#issuecomment-709856287
/pulsarbot run-failure-checks
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on pull request #8261: Support limits the max tenants of the Pulsar cluster
Posted by GitBox <gi...@apache.org>.
codelipenghui commented on pull request #8261:
URL: https://github.com/apache/pulsar/pull/8261#issuecomment-709954954
@sijie Please help review again.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] 315157973 commented on pull request #8261: Support limits the max tenants of the Pulsar cluster
Posted by GitBox <gi...@apache.org>.
315157973 commented on pull request #8261:
URL: https://github.com/apache/pulsar/pull/8261#issuecomment-708480194
/pulsarbot run-failure-checks
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] sijie merged pull request #8261: Support limits the max tenants of the Pulsar cluster
Posted by GitBox <gi...@apache.org>.
sijie merged pull request #8261:
URL: https://github.com/apache/pulsar/pull/8261
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] 315157973 commented on pull request #8261: Support limits the max tenants of the Pulsar cluster
Posted by GitBox <gi...@apache.org>.
315157973 commented on pull request #8261:
URL: https://github.com/apache/pulsar/pull/8261#issuecomment-708896590
/pulsarbot run-failure-checks
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] eolivelli commented on a change in pull request #8261: Support limits the max tenants of the Pulsar cluster
Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #8261:
URL: https://github.com/apache/pulsar/pull/8261#discussion_r504560033
##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TenantsBase.java
##########
@@ -105,6 +105,12 @@ public void createTenant(
try {
NamedEntity.checkName(tenant);
+ List<String> tenants = globalZk().getChildren(path(POLICIES), false);
+ int maxTenants = pulsar().getConfiguration().getMaxTenants();
+ //No locks for precise control
Review comment:
So we can have a race and see that this limit is not enforced.
probably this is not a big deal (and enforcing it would be very costly) but we should state it clearly at least in the description of this pull request
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] sijie commented on a change in pull request #8261: Support limits the max tenants of the Pulsar cluster
Posted by GitBox <gi...@apache.org>.
sijie commented on a change in pull request #8261:
URL: https://github.com/apache/pulsar/pull/8261#discussion_r505651881
##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TenantsBase.java
##########
@@ -105,6 +105,13 @@ public void createTenant(
try {
NamedEntity.checkName(tenant);
+ List<String> tenants = globalZk().getChildren(path(POLICIES), false);
Review comment:
You shouldn't get the list of tenants from zookeeper first. You should check `maxTenants` first. If `maxTenants` is larger than 0, this feature is enabled. Then you get the list of tenants.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] Huanli-Meng commented on pull request #8261: Support limits the max tenants of the Pulsar cluster
Posted by GitBox <gi...@apache.org>.
Huanli-Meng commented on pull request #8261:
URL: https://github.com/apache/pulsar/pull/8261#issuecomment-710072584
Add the doc-required label as the broker.config file is updated.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org