Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-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 CD0E318D71 for ; Thu, 9 Jul 2015 14:55:37 +0000 (UTC) Received: (qmail 99120 invoked by uid 500); 9 Jul 2015 14:55:37 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 99089 invoked by uid 500); 9 Jul 2015 14:55:37 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 99079 invoked by uid 99); 9 Jul 2015 14:55:37 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jul 2015 14:55:37 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 4B562D34C8 for ; Thu, 9 Jul 2015 14:55:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.452 X-Spam-Level: * X-Spam-Status: No, score=1.452 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.329, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id uS2Qje-eTN-F for ; Thu, 9 Jul 2015 14:55:36 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with SMTP id 067534E21B for ; Thu, 9 Jul 2015 14:55:28 +0000 (UTC) Received: (qmail 97764 invoked by uid 99); 9 Jul 2015 14:55:28 -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; Thu, 09 Jul 2015 14:55:28 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 75F11E682C; Thu, 9 Jul 2015 14:55:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.incubator.apache.org Date: Thu, 09 Jul 2015 14:56:04 -0000 Message-Id: <973096c8ea7441e791fc5cbea87bb6d1@git.apache.org> In-Reply-To: <1fbc140702914b4b9a1bc70f0193e81d@git.apache.org> References: <1fbc140702914b4b9a1bc70f0193e81d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [38/50] incubator-ignite git commit: # Fixed unmarshalling error handling for cache 'get' # Fixed unmarshalling error handling for cache 'get' Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6d6ec778 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6d6ec778 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6d6ec778 Branch: refs/heads/ignite-1085 Commit: 6d6ec778b43d730dd19001011aaaa49ec86c5d20 Parents: 94a42a4 Author: sboikov Authored: Wed Jul 8 15:08:33 2015 +0300 Committer: sboikov Committed: Wed Jul 8 15:08:33 2015 +0300 ---------------------------------------------------------------------- .../processors/cache/GridCacheIoManager.java | 8 ++- .../distributed/near/GridNearGetFuture.java | 4 +- .../cache/CacheFutureExceptionSelfTest.java | 72 +++++++++++++++++--- 3 files changed, 71 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6d6ec778/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java index 0707096..29e3551 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java @@ -445,8 +445,7 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter { case 50: { GridNearGetResponse res = (GridNearGetResponse)msg; - GridPartitionedGetFuture fut = (GridPartitionedGetFuture)ctx.mvcc().future( - res.version(), res.futureId()); + GridCacheFuture fut = ctx.mvcc().future(res.version(), res.futureId()); if (fut == null) { if (log.isDebugEnabled()) @@ -457,7 +456,10 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter { res.error(res.classError()); - fut.onResult(nodeId, res); + if (fut instanceof GridNearGetFuture) + ((GridNearGetFuture)fut).onResult(nodeId, res); + else + ((GridPartitionedGetFuture)fut).onResult(nodeId, res); } break; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6d6ec778/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java index 74438bb..58f6fe5 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java @@ -223,7 +223,7 @@ public final class GridNearGetFuture extends GridCompoundIdentityFuture> fut : futures()) if (isMini(fut)) { MiniFuture f = (MiniFuture)fut; @@ -649,7 +649,7 @@ public final class GridNearGetFuture extends GridCompoundIdentityFuture ccfg = new CacheConfiguration<>(); + + ccfg.setCopyOnRead(cpyOnRead); + + ccfg.setName(cacheName); + + IgniteCache cache = srv.createCache(ccfg); - IgniteCache cache = srv.getOrCreateCache("CACHE"); cache.put("key", new NotSerializableClass()); - Ignite client = startGrid(1); + IgniteCache clientCache = nearCache ? client.createNearCache(cacheName, + new NearCacheConfiguration<>()) : client.cache(cacheName); - IgniteCache asyncCache = client.cache("CACHE").withAsync(); + IgniteCache asyncCache = clientCache.withAsync(); - System.setProperty("FAIL", "true"); + fail = true; asyncCache.get("key"); @@ -79,7 +133,9 @@ public class CacheFutureExceptionSelfTest extends GridCommonAbstractTest { } }); - assertTrue(futLatch.await(60, SECONDS)); + assertTrue(futLatch.await(5, SECONDS)); + + srv.destroyCache(cache.getName()); } /** @@ -93,10 +149,10 @@ public class CacheFutureExceptionSelfTest extends GridCommonAbstractTest { /** {@inheritDoc}*/ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { - if (System.getProperty("FAIL") != null) + if (fail) throw new RuntimeException("Deserialization failed."); in.readObject(); } } -} \ No newline at end of file +} \ No newline at end of file