You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/02/01 08:47:28 UTC

[14/14] ignite git commit: IGNITE-2502: Comments.

IGNITE-2502: Comments.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5b6516d8
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5b6516d8
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5b6516d8

Branch: refs/heads/ignite-2502
Commit: 5b6516d8d3bb614b003ecdc547cbc93bc8b345de
Parents: cc2dc4f
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Mon Feb 1 10:47:08 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Feb 1 10:47:08 2016 +0300

----------------------------------------------------------------------
 .../distributed/dht/atomic/GridNearAtomicUpdateRequest.java      | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5b6516d8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
index 4bc3180..1a7fa88 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
@@ -238,6 +238,10 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements Gri
         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);