Repository: ignite Updated Branches: refs/heads/ignite-4680-sb 991f441ac -> b91b69350
tmp Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b91b6935 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b91b6935 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b91b6935 Branch: refs/heads/ignite-4680-sb Commit: b91b69350034cc0ba85cd8867cccc495cb54ccde Parents: 991f441 Author: sboikov <[email protected]> Authored: Tue Mar 21 15:18:33 2017 +0300 Committer: sboikov <[email protected]> Committed: Tue Mar 21 15:18:33 2017 +0300 ---------------------------------------------------------------------- .../dht/atomic/GridDhtAtomicCache.java | 78 ++++++++++++++------ 1 file changed, 54 insertions(+), 24 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/b91b6935/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java index 542071a..89c439a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java @@ -1808,11 +1808,39 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> { final AffinityAssignment affAssignment = ctx.affinity().assignment(req.topologyVersion()); if (TEST_STRIPE_SUBMIT) { + req.setResCount(stripemap.size()); + for (final Map.Entry<Integer, int[]> e : stripemap.entrySet()) { if (stripeIdx != e.getKey()) { ctx.kernalContext().getStripedExecutorService().execute(e.getKey(), new Runnable() { @Override public void run() { - // No-op. + if (req.addRes()) { + GridNearAtomicUpdateResponse res = new GridNearAtomicUpdateResponse(ctx.cacheId(), + node.id(), + req.futureId(), + req.partition(), + false, + ctx.deploymentEnabled()); + + res.returnValue(new GridCacheReturn(ctx, node.isLocal(), true, null, true)); + + for (int i = 0; i < req.size(); i++) { + fut.addWriteEntry(affAssignment, + req.key(i), + req.value(i), + null, + 0, + 0, + null, + false, + null, + 1L); + } + + fut.onDone(); + + completionCb.apply(req, res); + } } }); } @@ -1961,34 +1989,36 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> { unlockEntries(locked, null); if (TEST_STRIPE_SUBMIT){ - GridNearAtomicUpdateResponse res = new GridNearAtomicUpdateResponse(ctx.cacheId(), - node.id(), - req.futureId(), - req.partition(), - false, - ctx.deploymentEnabled()); + if (req.addRes()) { + GridNearAtomicUpdateResponse res = new GridNearAtomicUpdateResponse(ctx.cacheId(), + node.id(), + req.futureId(), + req.partition(), + false, + ctx.deploymentEnabled()); - if (hasNear) - res.nearVersion(ver); + if (hasNear) + res.nearVersion(ver); - res.returnValue(retVal); + res.returnValue(retVal); - for (int i = 0; i < req.size(); i++) { - fut.addWriteEntry(affinityAssignment, - req.key(i), - req.value(i), - null, - 0, - 0, - null, - false, - null, - 1L); - } + for (int i = 0; i < req.size(); i++) { + fut.addWriteEntry(affinityAssignment, + req.key(i), + req.value(i), + null, + 0, + 0, + null, + false, + null, + 1L); + } - fut.onDone(); + fut.onDone(); - completionCb.apply(req, res); + completionCb.apply(req, res); + } } else { if (req.addRes()) {
