Return-Path: X-Original-To: apmail-geode-commits-archive@minotaur.apache.org Delivered-To: apmail-geode-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 586D518C6B for ; Wed, 11 Nov 2015 21:22:17 +0000 (UTC) Received: (qmail 9538 invoked by uid 500); 11 Nov 2015 21:22:17 -0000 Delivered-To: apmail-geode-commits-archive@geode.apache.org Received: (qmail 9510 invoked by uid 500); 11 Nov 2015 21:22:17 -0000 Mailing-List: contact commits-help@geode.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.incubator.apache.org Delivered-To: mailing list commits@geode.incubator.apache.org Received: (qmail 8784 invoked by uid 99); 11 Nov 2015 21:22:16 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Nov 2015 21:22:16 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 5F892180A49 for ; Wed, 11 Nov 2015 21:22:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.771 X-Spam-Level: X-Spam-Status: No, score=0.771 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id f7fN825tIeo0 for ; Wed, 11 Nov 2015 21:22:11 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id 1938424E9C for ; Wed, 11 Nov 2015 21:22:09 +0000 (UTC) Received: (qmail 7680 invoked by uid 99); 11 Nov 2015 21:22:09 -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, 11 Nov 2015 21:22:09 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 10B7CDFF93; Wed, 11 Nov 2015 21:22:09 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ashvin@apache.org To: commits@geode.incubator.apache.org Date: Wed, 11 Nov 2015 21:22:10 -0000 Message-Id: <9c3641096eaf49d5bcfbd946bcd4ef8e@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/9] incubator-geode git commit: GEODE-494: remove failing test GEODE-494: remove failing test This test fails very intermittently but doesn't reflect any real-world use case so I'm deleting it. While debugging, found a logic error in PartitionManager but it seems that the code path is never exercised (used only in tests). Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/e96c960d Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/e96c960d Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/e96c960d Branch: refs/heads/feature/GEODE-11 Commit: e96c960d658044018be864ccfc81a7cf91e189b2 Parents: cfbeaf2 Author: Jens Deppe Authored: Mon Nov 9 15:42:42 2015 -0800 Committer: Jens Deppe Committed: Mon Nov 9 15:42:42 2015 -0800 ---------------------------------------------------------------------- .../cache/partition/PartitionManager.java | 2 +- .../partition/PartitionManagerDUnitTest.java | 75 -------------------- 2 files changed, 1 insertion(+), 76 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e96c960d/gemfire-core/src/main/java/com/gemstone/gemfire/cache/partition/PartitionManager.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/partition/PartitionManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/partition/PartitionManager.java index ceff534..8454d2c 100644 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/partition/PartitionManager.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/partition/PartitionManager.java @@ -191,7 +191,7 @@ public final class PartitionManager { logger.debug("createPrimaryBucket: {} bucket {} already primary, destroying local primary", pr, bucketId); } if (dumpBucket(self, region, bucketId)) { - createdBucket = createBucket(self, region, bucketId, destroyExistingRemote); + createdBucket = createBucket(self, region, bucketId, destroyExistingLocal); } } else { if (logger.isDebugEnabled()) { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e96c960d/gemfire-core/src/test/java/com/gemstone/gemfire/cache/partition/PartitionManagerDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/partition/PartitionManagerDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/partition/PartitionManagerDUnitTest.java index e061053..a7696c3 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/partition/PartitionManagerDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/partition/PartitionManagerDUnitTest.java @@ -440,79 +440,4 @@ public class PartitionManagerDUnitTest extends CacheTestCase { }); } - -public void testConcurrentWithPuts() throws Throwable { - - Host host = Host.getHost(0); - VM vm0 = host.getVM(0); - VM vm1 = host.getVM(1); - - SerializableRunnable createPrRegion = new SerializableRunnable("createRegion") { - public void run() - { - Cache cache = getCache(); - AttributesFactory attr = new AttributesFactory(); - PartitionAttributesFactory paf = new PartitionAttributesFactory(); - paf.setRedundantCopies(0); - paf.setRecoveryDelay(-1); - paf.setStartupRecoveryDelay(-1); - PartitionAttributes prAttr = paf.create(); - attr.setPartitionAttributes(prAttr); - cache.createRegion("region1", attr.create()); - } - }; - - vm0.invoke(createPrRegion); - vm1.invoke(createPrRegion); - - SerializableRunnable lotsOfPuts= new SerializableRunnable("A bunch of puts") { - public void run() - { - Cache cache = getCache(); - PartitionedRegion region = (PartitionedRegion) cache.getRegion("region1"); - - long start = System.nanoTime(); - - while(TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - start) < CONCURRENT_TIME) { - //Do a put which might trigger bucket creation - region.put(BUCKET_ID, "B"); - try { - Thread.sleep(10); - } catch (InterruptedException e) { - fail("", e); - } - } - } - }; - AsyncInvocation async0_2 = vm0.invokeAsync(lotsOfPuts); - AsyncInvocation async1_2 = vm1.invokeAsync(lotsOfPuts); - - - long start = System.nanoTime(); - - while(TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - start) < CONCURRENT_TIME) { - createPrimaryBucket(vm0, true, false); - createPrimaryBucket(vm1, true, false); - } - - async0_2.getResult(MAX_WAIT); - async1_2.getResult(MAX_WAIT); - - vm0.invoke(new SerializableRunnable("Check the number of owners") { - public void run() - { - Cache cache = getCache(); - PartitionedRegion region = (PartitionedRegion) cache.getRegion("region1"); - List owners; - try { - owners = region.getBucketOwnersForValidation(BUCKET_ID); - assertEquals(1, owners.size()); - } catch (ForceReattemptException e) { - fail("shouldn't have seen force reattempt", e); - } - } - }); - - } - }