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 E647518A07 for ; Wed, 20 Apr 2016 07:12:12 +0000 (UTC) Received: (qmail 72104 invoked by uid 500); 20 Apr 2016 07:12:07 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 71998 invoked by uid 500); 20 Apr 2016 07:12:07 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 71170 invoked by uid 99); 20 Apr 2016 07:12:07 -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, 20 Apr 2016 07:12:07 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 49838E027F; Wed, 20 Apr 2016 07:12:07 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vozerov@apache.org To: commits@ignite.apache.org Date: Wed, 20 Apr 2016 07:12:26 -0000 Message-Id: <7861c8822cb341f38456729fcd24f33f@git.apache.org> In-Reply-To: <654812b3ebd84403b663dfcdb1d3d270@git.apache.org> References: <654812b3ebd84403b663dfcdb1d3d270@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [21/26] ignite git commit: Removed "initCnt". Removed "initCnt". Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/776924b5 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/776924b5 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/776924b5 Branch: refs/heads/ignite-2523-1 Commit: 776924b5590b49000ad65be967425638e9120088 Parents: ff9e98a Author: vozerov-gridgain Authored: Tue Apr 19 15:04:24 2016 +0300 Committer: vozerov-gridgain Committed: Tue Apr 19 15:04:24 2016 +0300 ---------------------------------------------------------------------- .../atomic/GridNearAtomicSingleUpdateRequest.java | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/776924b5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateRequest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateRequest.java index f2a691f..f8bdbe4 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateRequest.java @@ -30,7 +30,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; import org.apache.ignite.internal.processors.cache.KeyCacheObject; import org.apache.ignite.internal.processors.cache.distributed.IgniteExternalizableExpiryPolicy; import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; -import org.apache.ignite.internal.util.GridLongList; import org.apache.ignite.internal.util.tostring.GridToStringInclude; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.CU; @@ -146,10 +145,6 @@ public class GridNearAtomicSingleUpdateRequest extends GridNearAtomicAbstractUpd @GridDirectTransient private GridNearAtomicUpdateResponse res; - /** Maximum possible size of inner collections. */ - @GridDirectTransient - private int initSize; - /** * Empty constructor required by {@link Externalizable}. */ @@ -226,13 +221,7 @@ public class GridNearAtomicSingleUpdateRequest extends GridNearAtomicAbstractUpd this.clientReq = clientReq; this.addDepInfo = addDepInfo; - // By default ArrayList expands to array of 10 elements on first add. We cannot guess how many entries - // will be added to request because of unknown affinity distribution. However, we DO KNOW how many keys - // participate in request. As such, we know upper bound of all collections in request. If this bound is lower - // than 10, we use it. - initSize = Math.min(maxEntryCnt, 10); - - keys = new ArrayList<>(initSize); + keys = new ArrayList<>(1); } /** {@inheritDoc} */ @@ -341,7 +330,7 @@ public class GridNearAtomicSingleUpdateRequest extends GridNearAtomicAbstractUpd if (entryProcessor != null) { if (entryProcessors == null) - entryProcessors = new ArrayList<>(initSize); + entryProcessors = new ArrayList<>(1); entryProcessors.add(entryProcessor); } @@ -349,7 +338,7 @@ public class GridNearAtomicSingleUpdateRequest extends GridNearAtomicAbstractUpd assert val instanceof CacheObject : val; if (vals == null) - vals = new ArrayList<>(initSize); + vals = new ArrayList<>(1); vals.add((CacheObject)val); }