Skip to content

Commit

Permalink
fix zk-create
Browse files Browse the repository at this point in the history
  • Loading branch information
rdhabalia committed Feb 12, 2021
1 parent ab5a8b9 commit ec31a9a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ private CompletableFuture<Void> tryCreatePartitionAsync(final int partition, Com
} else if (ex.getCause() instanceof BadVersionException) {
log.warn("[{}] Fail to create topic partition {} with concurrent modification, retry now.",
clientAppId(), topicName.getPartition(partition));
tryCreatePartitionAsync(partition, result);
// metadata-store api returns BadVersionException if node already exists while creating the
// resource
result.complete(null);
} else {
log.error("[{}] Fail to create topic partition {}", clientAppId(),
topicName.getPartition(partition), ex.getCause());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;

Expand All @@ -71,7 +70,6 @@
import org.apache.pulsar.broker.ServiceConfiguration;
import org.apache.pulsar.broker.authentication.AuthenticationDataSource;
import org.apache.pulsar.broker.authentication.AuthenticationProvider;
import org.apache.pulsar.broker.loadbalance.LeaderElectionService;
import org.apache.pulsar.broker.loadbalance.LoadManager;
import org.apache.pulsar.broker.loadbalance.ResourceUnit;
import org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -832,8 +832,8 @@ public void testTopicAutoUpdatePartitions() throws Exception {
final String messagePredicate = "my-message-" + key + "-";
final int totalMessages = 6;

final String topicName1 = "persistent://prop/use/ns-abc/topic-1-" + key;
final String topicName2 = "persistent://prop/use/ns-abc/topic-2-" + key;
final String topicName1 = "persistent://my-property/my-ns/topic-1-" + key;
final String topicName2 = "persistent://my-property/my-ns/topic-2-" + key;
List<String> topicNames = Lists.newArrayList(topicName1, topicName2);

TenantInfo tenantInfo = createDefaultTenantInfo();
Expand Down Expand Up @@ -892,7 +892,7 @@ public void testTopicAutoUpdatePartitions() throws Exception {

@Test(timeOut = testTimeout)
public void testConsumerDistributionInFailoverSubscriptionWhenUpdatePartitions() throws Exception {
final String topicName = "persistent://prop/use/ns-abc/testConsumerDistributionInFailoverSubscriptionWhenUpdatePartitions";
final String topicName = "persistent://my-property/my-ns/testConsumerDistributionInFailoverSubscriptionWhenUpdatePartitions";
final String subName = "failover-test";
TenantInfo tenantInfo = createDefaultTenantInfo();
admin.tenants().createTenant("prop", tenantInfo);
Expand Down

0 comments on commit ec31a9a

Please sign in to comment.