From commits-return-12990-archive-asf-public=cust-asf.ponee.io@pulsar.incubator.apache.org Mon Aug 20 19:39:58 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id AE97C180663 for ; Mon, 20 Aug 2018 19:39:57 +0200 (CEST) Received: (qmail 9048 invoked by uid 500); 20 Aug 2018 17:39:56 -0000 Mailing-List: contact commits-help@pulsar.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pulsar.incubator.apache.org Delivered-To: mailing list commits@pulsar.incubator.apache.org Received: (qmail 9039 invoked by uid 99); 20 Aug 2018 17:39:56 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Aug 2018 17:39:56 +0000 From: GitBox To: commits@pulsar.apache.org Subject: [GitHub] sijie closed pull request #2399: Fixed initialization order of acknowledgmentsGroupingTracker in ConsumerImpl Message-ID: <153478679628.1865.16675168628344255653.gitbox@gitbox.apache.org> Date: Mon, 20 Aug 2018 17:39:56 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit sijie closed pull request #2399: Fixed initialization order of acknowledgmentsGroupingTracker in ConsumerImpl URL: https://github.com/apache/incubator-pulsar/pull/2399 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java index 3e947249b0..da04534d94 100644 --- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java +++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java @@ -160,15 +160,6 @@ this.readCompacted = conf.isReadCompacted(); this.subscriptionInitialPosition = conf.getSubscriptionInitialPosition(); - TopicName topicName = TopicName.get(topic); - if (topicName.isPersistent()) { - this.acknowledgmentsGroupingTracker = - new PersistentAcknowledgmentsGroupingTracker(this, conf, client.eventLoopGroup()); - } else { - this.acknowledgmentsGroupingTracker = - NonPersistentAcknowledgmentGroupingTracker.of(); - } - if (client.getConfiguration().getStatsIntervalSeconds() > 0) { stats = new ConsumerStatsRecorderImpl(client, conf, this); } else { @@ -203,6 +194,15 @@ new Backoff(100, TimeUnit.MILLISECONDS, 60, TimeUnit.SECONDS, 0, TimeUnit.MILLISECONDS), this); + TopicName topicName = TopicName.get(topic); + if (topicName.isPersistent()) { + this.acknowledgmentsGroupingTracker = + new PersistentAcknowledgmentsGroupingTracker(this, conf, client.eventLoopGroup()); + } else { + this.acknowledgmentsGroupingTracker = + NonPersistentAcknowledgmentGroupingTracker.of(); + } + grabCnx(); } ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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 With regards, Apache Git Services