#IGNITE-53: wip.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/84aba1f5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/84aba1f5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/84aba1f5 Branch: refs/heads/ignite-49 Commit: 84aba1f5b850cbf7205e1d57b96e804e55bf0e4a Parents: 5aa877b Author: ivasilinets <ivasilin...@gridgain.com> Authored: Thu Jan 22 18:56:33 2015 +0300 Committer: ivasilinets <ivasilin...@gridgain.com> Committed: Thu Jan 22 18:56:33 2015 +0300 ---------------------------------------------------------------------- .../processors/cache/query/GridCacheQueryAdapter.java | 2 +- .../cache/query/GridCacheQueryFutureAdapter.java | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/84aba1f5/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java index ba4512c..ebfa554 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java @@ -469,7 +469,7 @@ public class GridCacheQueryAdapter<T> implements GridCacheQuery<T> { return Collections.singletonList(cctx.localNode()); case REPLICATED: - if (prj != null) + if (prj != null || !incBackups) return nodes(cctx, prj); GridCacheDistributionMode mode = cctx.config().getDistributionMode(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/84aba1f5/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryFutureAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryFutureAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryFutureAdapter.java index 9c5c0ad..97317ad 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryFutureAdapter.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryFutureAdapter.java @@ -23,7 +23,6 @@ import org.gridgain.grid.*; import org.gridgain.grid.cache.query.*; import org.gridgain.grid.kernal.processors.cache.*; import org.gridgain.grid.kernal.processors.timeout.*; -import org.gridgain.grid.util.*; import org.gridgain.grid.util.future.*; import org.gridgain.grid.util.typedef.*; import org.gridgain.grid.util.typedef.internal.*; @@ -124,7 +123,7 @@ public abstract class GridCacheQueryFutureAdapter<K, V, R> extends GridFutureAda cctx.time().addTimeoutObject(this); } - keys = qry.query().enableDedup() ? new GridConcurrentHashSet<K>() : null; + keys = qry.query().enableDedup() ? new HashSet<K>() : null; } /** @@ -341,9 +340,11 @@ public abstract class GridCacheQueryFutureAdapter<K, V, R> extends GridFutureAda Collection<Object> dedupCol = new ArrayList<>(col.size()); - for (Object o : col) - if (!(o instanceof Map.Entry) || keys.add(((Map.Entry<K, V>)o).getKey())) - dedupCol.add(o); + synchronized (mux) { + for (Object o : col) + if (!(o instanceof Map.Entry) || keys.add(((Map.Entry<K, V>) o).getKey())) + dedupCol.add(o); + } return dedupCol; }