Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 54EE9200CB6 for ; Thu, 15 Jun 2017 01:02:29 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 53E76160BE8; Wed, 14 Jun 2017 23:02:29 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C17BB160BDB for ; Thu, 15 Jun 2017 01:02:28 +0200 (CEST) Received: (qmail 60784 invoked by uid 500); 14 Jun 2017 23:02:26 -0000 Mailing-List: contact dev-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list dev@geode.apache.org Received: (qmail 60773 invoked by uid 99); 14 Jun 2017 23:02:25 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Jun 2017 23:02:25 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E1B84DFAB0; Wed, 14 Jun 2017 23:02:24 +0000 (UTC) From: upthewaterspout To: dev@geode.apache.org Reply-To: dev@geode.apache.org References: In-Reply-To: Subject: [GitHub] geode pull request #570: GEODE-3055: waitUntilFlush should use data region's... Content-Type: text/plain Message-Id: <20170614230224.E1B84DFAB0@git1-us-west.apache.org> Date: Wed, 14 Jun 2017 23:02:24 +0000 (UTC) archived-at: Wed, 14 Jun 2017 23:02:29 -0000 Github user upthewaterspout commented on a diff in the pull request: https://github.com/apache/geode/pull/570#discussion_r122085382 --- Diff: geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java --- @@ -1472,6 +1472,19 @@ public boolean removeBucket(int bucketId, boolean forceRemovePrimary) { } BucketAdvisor bucketAdvisor = bucketRegion.getBucketAdvisor(); + InternalDistributedMember primary = bucketAdvisor.getPrimary(); + InternalDistributedMember myId = + this.partitionedRegion.getDistributionManager().getDistributionManagerId(); + if (primary == null || myId.equals(primary)) { --- End diff -- This seems similar to the logic a few lines down where we say "if (!forceRemovePrimary && bucketAdvisor.isPrimary()) {..." Unlike that line, your new logic doesn't honor the forceRemovePrimary flag. Should it? I don't actually see any cases where that is passed in as true, so maybe we should just remove that flag? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---