You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by se...@apache.org on 2015/05/15 13:51:58 UTC
incubator-ignite git commit: # IGNITE-709 Revert bad fix.
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-709_2 ccc854af4 -> 6762cf943
# IGNITE-709 Revert bad fix.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6762cf94
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6762cf94
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6762cf94
Branch: refs/heads/ignite-709_2
Commit: 6762cf9433725c58381a5629421982f473519738
Parents: ccc854a
Author: sevdokimov <se...@gridgain.com>
Authored: Fri May 15 14:51:50 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Fri May 15 14:51:50 2015 +0300
----------------------------------------------------------------------
.../internal/processors/cache/GridCacheUtils.java | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6762cf94/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index 8e082c0..549f42f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -631,14 +631,9 @@ public class GridCacheUtils {
* @return Oldest node for the given topology version.
*/
public static ClusterNode oldest(GridCacheContext cctx, AffinityTopologyVersion topOrder) {
- Collection<ClusterNode> aliveCacheNodes = aliveNodes(cctx, topOrder);
-
- if (aliveCacheNodes.isEmpty())
- return cctx.localNode();
-
ClusterNode oldest = null;
- for (ClusterNode n : aliveCacheNodes)
+ for (ClusterNode n : aliveNodes(cctx, topOrder))
if (oldest == null || n.order() < oldest.order())
oldest = n;
@@ -656,14 +651,9 @@ public class GridCacheUtils {
* @return Oldest node for the given topology version.
*/
public static ClusterNode oldest(GridCacheSharedContext cctx, AffinityTopologyVersion topOrder) {
- Collection<ClusterNode> aliveCacheNodes = aliveCacheNodes(cctx, topOrder);
-
- if (aliveCacheNodes.isEmpty())
- return cctx.localNode();
-
ClusterNode oldest = null;
- for (ClusterNode n : aliveCacheNodes) {
+ for (ClusterNode n : aliveCacheNodes(cctx, topOrder)) {
if (oldest == null || n.order() < oldest.order())
oldest = n;
}