You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by te...@apache.org on 2023/03/06 03:56:00 UTC

[pulsar] branch branch-2.11 updated: Fix race condition while updating partition number (#19199).

This is an automated email from the ASF dual-hosted git repository.

technoboy pushed a commit to branch branch-2.11
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-2.11 by this push:
     new 3f2898904a7 Fix race condition while updating partition number (#19199).
3f2898904a7 is described below

commit 3f2898904a73b9b334c060670d25ad64f349f3e8
Author: Jiwe Guo <te...@apache.org>
AuthorDate: Mon Mar 6 11:55:40 2023 +0800

    Fix race condition while updating partition number (#19199).
---
 .../java/org/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 789f14633b2..8e6f355af54 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
@@ -4414,7 +4414,7 @@ public class PersistentTopicsBase extends AdminResource {
                         final String topicNamePartition = topicName.getPartition(i).toString();
                         CompletableFuture<Void> 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 {