From 4d578285f37de5cb0f31a0716cab989cce952214 Mon Sep 17 00:00:00 2001 From: Qiang Zhao Date: Thu, 12 Jan 2023 18:12:37 +0800 Subject: [PATCH] [fix][broker] Fix race condition while updating partition number (#19199) --- .../apache/pulsar/broker/admin/impl/PersistentTopicsBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java index a6ffe606d818c..e839ec3064e21 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java @@ -4446,7 +4446,7 @@ private CompletableFuture createSubscriptions(TopicName topicName, int exp final String topicNamePartition = topicName.getPartition(i).toString(); CompletableFuture future = new CompletableFuture<>(); admin.topics().createSubscriptionAsync(topicNamePartition, - subscription, MessageId.latest, replicated).whenComplete((__, ex) -> { + subscription, MessageId.earliest, replicated).whenComplete((__, ex) -> { if (ex == null) { future.complete(null); } else {