Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static java.lang.String.format;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import static org.apache.pulsar.common.naming.NamespaceName.SYSTEM_NAMESPACE;
Expand Down Expand Up @@ -899,9 +900,10 @@ void splitAndOwnBundleOnceAndRetry(NamespaceBundle bundle,
// retry several times on BadVersion
if ((t.getCause() instanceof MetadataStoreException.BadVersionException)
&& (counter.decrementAndGet() >= 0)) {
pulsar.getOrderedExecutor()
pulsar.getExecutor().schedule(() -> pulsar.getOrderedExecutor()
.execute(() -> splitAndOwnBundleOnceAndRetry(
bundle, unload, counter, completionFuture, splitAlgorithm, boundaries));
bundle, unload, counter, completionFuture, splitAlgorithm, boundaries)),
100, MILLISECONDS);
} else if (t instanceof IllegalArgumentException) {
completionFuture.completeExceptionally(t);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1717,7 +1717,7 @@ public void testNamespaceSplitBundleConcurrent() throws Exception {
try {
admin.namespaces().splitNamespaceBundle(namespace, "0x00000000_0xffffffff", false, null);
} catch (Exception e) {
fail("split bundle shouldn't have thrown exception");
fail("split bundle shouldn't have thrown exception", e);
}

// bundle-factory cache must have updated split bundles
Expand Down Expand Up @@ -1745,7 +1745,7 @@ public void testNamespaceSplitBundleConcurrent() throws Exception {
f.get();
}
} catch (Exception e) {
fail("split bundle shouldn't have thrown exception");
fail("split bundle shouldn't have thrown exception", e);
}

Awaitility.await().untilAsserted(() ->
Expand Down Expand Up @@ -1780,7 +1780,7 @@ public void testNamespaceSplitBundleConcurrent() throws Exception {
f.get();
}
} catch (Exception e) {
fail("split bundle shouldn't have thrown exception");
fail("split bundle shouldn't have thrown exception", e);
}
Awaitility.await().untilAsserted(() ->
assertEquals(bundleFactory.getBundles(NamespaceName.get(namespace)).getBundles().size(), 8));
Expand Down