You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dm...@apache.org on 2015/10/22 15:01:56 UTC
[40/42] ignite git commit: ignite-1272: initializing addDepInfo flag
to a valid value for every GridCacheMessage
ignite-1272: initializing addDepInfo flag to a valid value for every GridCacheMessage
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a7051f1d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a7051f1d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a7051f1d
Branch: refs/heads/ignite-1272
Commit: a7051f1d870ed2ba557575745e9ea10313beadef
Parents: a776a9c
Author: Denis Magda <dm...@gridgain.com>
Authored: Thu Oct 22 15:50:38 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Thu Oct 22 15:50:39 2015 +0300
----------------------------------------------------------------------
.../cache/GridCacheEvictionManager.java | 8 ++--
.../cache/GridCacheEvictionRequest.java | 14 ++++--
.../cache/GridCacheEvictionResponse.java | 7 ++-
.../processors/cache/GridCacheIoManager.java | 49 +++++++-------------
.../processors/cache/GridCacheMessage.java | 39 ++++++----------
.../distributed/GridCacheTtlUpdateRequest.java | 7 ++-
.../distributed/GridCacheTxRecoveryFuture.java | 9 ++--
.../distributed/GridCacheTxRecoveryRequest.java | 7 +--
.../GridCacheTxRecoveryResponse.java | 8 ++--
.../distributed/GridDistributedBaseMessage.java | 16 +++++--
.../distributed/GridDistributedLockRequest.java | 8 ++--
.../GridDistributedLockResponse.java | 20 +++++---
.../GridDistributedTxFinishRequest.java | 6 ++-
.../GridDistributedTxFinishResponse.java | 7 ++-
.../GridDistributedTxPrepareRequest.java | 8 ++--
.../GridDistributedTxPrepareResponse.java | 12 +++--
.../GridDistributedUnlockRequest.java | 7 +--
.../dht/GridDhtAffinityAssignmentRequest.java | 7 ++-
.../dht/GridDhtAffinityAssignmentResponse.java | 7 ++-
.../distributed/dht/GridDhtCacheAdapter.java | 3 +-
.../distributed/dht/GridDhtLockFuture.java | 5 +-
.../distributed/dht/GridDhtLockRequest.java | 7 ++-
.../distributed/dht/GridDhtLockResponse.java | 14 ++++--
.../dht/GridDhtTransactionalCacheAdapter.java | 22 +++++----
.../distributed/dht/GridDhtTxFinishRequest.java | 8 ++--
.../dht/GridDhtTxFinishResponse.java | 4 +-
.../dht/GridDhtTxPrepareRequest.java | 26 +++++------
.../dht/GridDhtTxPrepareResponse.java | 14 +++---
.../distributed/dht/GridDhtUnlockRequest.java | 7 +--
.../dht/GridPartitionedGetFuture.java | 3 +-
.../dht/atomic/GridDhtAtomicCache.java | 12 ++---
.../GridDhtAtomicDeferredUpdateResponse.java | 12 ++++-
.../dht/atomic/GridDhtAtomicUpdateFuture.java | 6 ++-
.../dht/atomic/GridDhtAtomicUpdateRequest.java | 10 +++-
.../dht/atomic/GridDhtAtomicUpdateResponse.java | 11 ++++-
.../dht/atomic/GridNearAtomicUpdateFuture.java | 12 +++--
.../dht/atomic/GridNearAtomicUpdateRequest.java | 10 +++-
.../atomic/GridNearAtomicUpdateResponse.java | 11 ++++-
.../dht/colocated/GridDhtColocatedCache.java | 8 ++--
.../colocated/GridDhtColocatedLockFuture.java | 3 +-
.../dht/preloader/GridDhtForceKeysFuture.java | 5 +-
.../dht/preloader/GridDhtForceKeysRequest.java | 35 +++++++-------
.../dht/preloader/GridDhtForceKeysResponse.java | 11 ++++-
.../GridDhtPartitionDemandMessage.java | 5 ++
.../GridDhtPartitionSupplyMessage.java | 9 +++-
.../preloader/GridDhtPartitionSupplyPool.java | 10 ++--
.../GridDhtPartitionsAbstractMessage.java | 6 ++-
.../dht/preloader/GridDhtPreloader.java | 3 +-
.../distributed/near/GridNearGetFuture.java | 5 +-
.../distributed/near/GridNearGetRequest.java | 12 ++++-
.../distributed/near/GridNearGetResponse.java | 12 ++++-
.../distributed/near/GridNearLockFuture.java | 3 +-
.../distributed/near/GridNearLockRequest.java | 8 +++-
.../distributed/near/GridNearLockResponse.java | 8 ++--
.../near/GridNearOptimisticTxPrepareFuture.java | 3 +-
.../GridNearPessimisticTxPrepareFuture.java | 3 +-
.../near/GridNearTransactionalCache.java | 8 ++--
.../near/GridNearTxFinishRequest.java | 8 ++--
.../near/GridNearTxFinishResponse.java | 2 -
.../near/GridNearTxPrepareRequest.java | 7 +--
.../near/GridNearTxPrepareResponse.java | 7 ++-
.../distributed/near/GridNearUnlockRequest.java | 7 +--
.../query/GridCacheDistributedQueryFuture.java | 5 +-
.../query/GridCacheDistributedQueryManager.java | 25 ++++++----
.../cache/query/GridCacheQueryRequest.java | 28 ++++++++---
.../cache/query/GridCacheQueryResponse.java | 16 +++++--
.../cache/transactions/IgniteTxHandler.java | 6 +--
.../GridCacheConditionalDeploymentSelfTest.java | 29 +++---------
.../GridCacheDeploymentOffHeapSelfTest.java | 15 ------
.../communication/GridCacheMessageSelfTest.java | 17 ++++++-
70 files changed, 464 insertions(+), 308 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
index 1c34c76..c038467 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
@@ -443,7 +443,8 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter {
nearEntries.add(e);
}
- GridCacheEvictionResponse res = new GridCacheEvictionResponse(cctx.cacheId(), req.futureId());
+ GridCacheEvictionResponse res = new GridCacheEvictionResponse(cctx.cacheId(), req.futureId(),
+ cctx.deploymentEnabled());
GridCacheVersion obsoleteVer = cctx.versions().next();
@@ -1742,7 +1743,8 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter {
// There are remote participants.
for (ClusterNode node : nodes) {
GridCacheEvictionRequest req = F.addIfAbsent(reqMap, node.id(),
- new GridCacheEvictionRequest(cctx.cacheId(), id, evictInfos.size(), topVer));
+ new GridCacheEvictionRequest(cctx.cacheId(), id, evictInfos.size(), topVer,
+ cctx.deploymentEnabled()));
assert req != null;
@@ -2106,4 +2108,4 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter {
return S.toString(EvictionFuture.class, this);
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java
index 4e0807a..09652a9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java
@@ -62,14 +62,17 @@ public class GridCacheEvictionRequest extends GridCacheMessage implements GridCa
* @param futId Future id.
* @param size Size.
* @param topVer Topology version.
+ * @param addDepInfo Deployment info flag.
*/
- GridCacheEvictionRequest(int cacheId, long futId, int size, @NotNull AffinityTopologyVersion topVer) {
+ GridCacheEvictionRequest(int cacheId, long futId, int size, @NotNull AffinityTopologyVersion topVer,
+ boolean addDepInfo) {
assert futId > 0;
assert size > 0;
assert topVer.topologyVersion() > 0;
this.cacheId = cacheId;
this.futId = futId;
+ this.addDepInfo = addDepInfo;
entries = new ArrayList<>(size);
@@ -84,12 +87,10 @@ public class GridCacheEvictionRequest extends GridCacheMessage implements GridCa
if (entries != null) {
GridCacheContext cctx = ctx.cacheContext(cacheId);
- boolean depEnabled = cctx.deploymentEnabled();
-
for (CacheEvictionEntry e : entries) {
e.prepareMarshal(cctx);
- if (depEnabled)
+ if (addDepInfo)
prepareObject(e.key().value(cctx.cacheObjectContext(), false), cctx);
}
}
@@ -107,6 +108,11 @@ public class GridCacheEvictionRequest extends GridCacheMessage implements GridCa
}
}
+ /** {@inheritDoc} */
+ @Override public boolean addDeploymentInfo() {
+ return addDepInfo;
+ }
+
/**
* @return Future id.
*/
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java
index aa3911b..ebaee6a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java
@@ -88,6 +88,11 @@ public class GridCacheEvictionResponse extends GridCacheMessage {
finishUnmarshalCacheObjects(rejectedKeys, ctx.cacheContext(cacheId), ldr);
}
+ /** {@inheritDoc} */
+ @Override public boolean addDeploymentInfo() {
+ return false;
+ }
+
/**
* @return Future ID.
*/
@@ -217,4 +222,4 @@ public class GridCacheEvictionResponse extends GridCacheMessage {
@Override public String toString() {
return S.toString(GridCacheEvictionResponse.class, this);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
index 9f2de47..03810f5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
@@ -284,6 +284,7 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
/**
* Sends response on failed message.
+ *
* @param nodeId node id.
* @param res response.
* @param cctx shared context.
@@ -302,6 +303,7 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
/**
* Processes failed messages.
+ *
* @param nodeId niode id.
* @param msg message.
* @throws IgniteCheckedException If failed.
@@ -332,7 +334,8 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
req.version(),
req.futureId(),
req.miniId(),
- 0);
+ 0,
+ ctx.deploymentEnabled());
sendResponseOnFailedMessage(nodeId, res, cctx, ctx.ioPolicy());
}
@@ -360,7 +363,8 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
GridDhtAtomicUpdateResponse res = new GridDhtAtomicUpdateResponse(
ctx.cacheId(),
- req.futureVersion());
+ req.futureVersion(),
+ ctx.deploymentEnabled());
res.onError(req.classError());
@@ -375,7 +379,8 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
GridNearAtomicUpdateResponse res = new GridNearAtomicUpdateResponse(
ctx.cacheId(),
nodeId,
- req.futureVersion());
+ req.futureVersion(),
+ ctx.deploymentEnabled());
res.error(req.classError());
@@ -390,7 +395,8 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
GridDhtForceKeysResponse res = new GridDhtForceKeysResponse(
ctx.cacheId(),
req.futureId(),
- req.miniId()
+ req.miniId(),
+ ctx.deploymentEnabled()
);
res.error(req.classError());
@@ -415,7 +421,8 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
ctx.cacheId(),
req.futureId(),
req.miniId(),
- req.version());
+ req.version(),
+ ctx.deploymentEnabled());
res.error(req.classError());
@@ -457,7 +464,8 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
false,
0,
req.classError(),
- null);
+ null,
+ ctx.deploymentEnabled());
sendResponseOnFailedMessage(nodeId, res, cctx, ctx.ioPolicy());
}
@@ -542,27 +550,8 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
if (destNodeId == null || !cctx.localNodeId().equals(destNodeId)) {
msg.prepareMarshal(cctx);
- if (depEnabled) {
- boolean depEnabled0;
-
- if (msg.addDeploymentInfo() != null)
- depEnabled0 = msg.addDeploymentInfo();
- else {
- GridCacheContext ctx = cctx.cacheContext(msg.cacheId());
-
- if (ctx == null) {
- U.error(log, "Deployment related info is missing in message: [msg=" + msg + ']');
-
- throw new IgniteCheckedException("Deployment related info is missing in message: [msg=" +
- msg + ']');
- }
-
- depEnabled0 = ctx.deploymentEnabled();
- }
-
- if (depEnabled0 && msg instanceof GridCacheDeployable)
- cctx.deploy().prepare((GridCacheDeployable)msg);
- }
+ if (msg instanceof GridCacheDeployable && msg.addDeploymentInfo())
+ cctx.deploy().prepare((GridCacheDeployable)msg);
}
return true;
@@ -787,8 +776,7 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
}
/**
- * @return ID that auto-grows based on local counter and counters received
- * from other nodes.
+ * @return ID that auto-grows based on local counter and counters received from other nodes.
*/
public long nextIoId() {
return idGen.incrementAndGet();
@@ -805,8 +793,7 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
public void sendNoRetry(ClusterNode node,
GridCacheMessage msg,
byte plc)
- throws IgniteCheckedException
- {
+ throws IgniteCheckedException {
assert node != null;
assert msg != null;
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
index 2e815fd..f424b0f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
@@ -67,6 +67,10 @@ public abstract class GridCacheMessage implements Message {
/** */
@GridDirectTransient
+ protected boolean addDepInfo;
+
+ /** */
+ @GridDirectTransient
private IgniteCheckedException err;
/** */
@@ -77,13 +81,6 @@ public abstract class GridCacheMessage implements Message {
protected int cacheId;
/**
- * Deployment enabled flag indicates whether deployment info has to be added to this message.
- * If the flag is not set use {@link GridCacheMessage#cacheId} to find out this information.
- */
- @GridDirectTransient
- protected Boolean addDepInfo;
-
- /**
* @return Error, if any.
*/
@Nullable public Throwable error() {
@@ -182,15 +179,10 @@ public abstract class GridCacheMessage implements Message {
/**
* Deployment enabled flag indicates whether deployment info has to be added to this message.
- * If the flag is not set use {@link #cacheId()} to find out this information.
*
- * @return {@code true} or {@code false} if the deployment is enabled or disabled for all active caches involved
- * in this message. Returns {@code null} if the flag hasn't been explicitly specified and {@link #cacheId()} has
- * to be use to find out whether deployment is enabled for a cache or not.
+ * @return {@code true} or if deployment info must be added to the the message, {@code false} otherwise.
*/
- public Boolean addDeploymentInfo() {
- return addDepInfo;
- }
+ public abstract boolean addDeploymentInfo();
/**
* @param o Object to prepare for marshalling.
@@ -198,7 +190,7 @@ public abstract class GridCacheMessage implements Message {
* @throws IgniteCheckedException If failed.
*/
protected final void prepareObject(@Nullable Object o, GridCacheContext ctx) throws IgniteCheckedException {
- assert ctx.deploymentEnabled();
+ assert addDepInfo;
if (!skipPrepare && o != null) {
GridDeploymentInfo d = ctx.deploy().globalDeploymentInfo();
@@ -280,7 +272,7 @@ public abstract class GridCacheMessage implements Message {
if (info != null) {
info.marshal(ctx);
- if (ctx.deploymentEnabled()) {
+ if (addDepInfo) {
if (info.key() != null)
prepareObject(info.key().value(ctx.cacheObjectContext(), false), ctx);
@@ -359,8 +351,7 @@ public abstract class GridCacheMessage implements Message {
GridCacheContext cctx = ctx.cacheContext(e.cacheId());
- if (cctx.deploymentEnabled()) {
-
+ if (addDepInfo) {
if (e.key() != null)
prepareObject(e.key().value(cctx.cacheObjectContext(), false), cctx);
@@ -415,7 +406,7 @@ public abstract class GridCacheMessage implements Message {
for (int i = 0; i < args.length; i++) {
Object arg = args[i];
- if (ctx.deploymentEnabled())
+ if (addDepInfo)
prepareObject(arg, ctx);
argsBytes[i] = arg == null ? null : CU.marshal(ctx, arg);
@@ -467,7 +458,7 @@ public abstract class GridCacheMessage implements Message {
List<byte[]> byteCol = new ArrayList<>(col.size());
for (Object o : col) {
- if (ctx.deploymentEnabled())
+ if (addDepInfo)
prepareObject(o, ctx);
byteCol.add(o == null ? null : CU.marshal(ctx, o));
@@ -489,15 +480,13 @@ public abstract class GridCacheMessage implements Message {
int size = col.size();
- boolean depEnabled = ctx.deploymentEnabled();
-
for (int i = 0 ; i < size; i++) {
CacheObject obj = col.get(i);
if (obj != null) {
obj.prepareMarshal(ctx.cacheObjectContext());
- if (depEnabled)
+ if (addDepInfo)
prepareObject(obj.value(ctx.cacheObjectContext(), false), ctx);
}
}
@@ -513,13 +502,11 @@ public abstract class GridCacheMessage implements Message {
if (col == null)
return;
- boolean depEnabled = ctx.deploymentEnabled();
-
for (CacheObject obj : col) {
if (obj != null) {
obj.prepareMarshal(ctx.cacheObjectContext());
- if (depEnabled)
+ if (addDepInfo)
prepareObject(obj.value(ctx.cacheObjectContext(), false), ctx);
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTtlUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTtlUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTtlUpdateRequest.java
index c911b5b..8177c98 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTtlUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTtlUpdateRequest.java
@@ -194,6 +194,11 @@ public class GridCacheTtlUpdateRequest extends GridCacheMessage {
}
/** {@inheritDoc} */
+ @Override public boolean addDeploymentInfo() {
+ return false;
+ }
+
+ /** {@inheritDoc} */
@Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
writer.setBuffer(buf);
@@ -327,4 +332,4 @@ public class GridCacheTtlUpdateRequest extends GridCacheMessage {
@Override public String toString() {
return S.toString(GridCacheTtlUpdateRequest.class, this, "super", super.toString());
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryFuture.java
index d6f6a18..4d75403 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryFuture.java
@@ -162,7 +162,8 @@ public class GridCacheTxRecoveryFuture extends GridCompoundIdentityFuture<Boolea
0,
true,
futureId(),
- fut.futureId());
+ fut.futureId(),
+ tx.activeCachesDeploymentEnabled());
try {
cctx.io().send(nearNodeId, req, tx.ioPolicy());
@@ -267,7 +268,8 @@ public class GridCacheTxRecoveryFuture extends GridCompoundIdentityFuture<Boolea
nodeTransactions(id),
false,
futureId(),
- fut.futureId());
+ fut.futureId(),
+ tx.activeCachesDeploymentEnabled());
try {
cctx.io().send(id, req, tx.ioPolicy());
@@ -292,7 +294,8 @@ public class GridCacheTxRecoveryFuture extends GridCompoundIdentityFuture<Boolea
nodeTransactions(nodeId),
false,
futureId(),
- fut.futureId());
+ fut.futureId(),
+ tx.activeCachesDeploymentEnabled());
try {
cctx.io().send(nodeId, req, tx.ioPolicy());
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryRequest.java
index df76297..e5787d7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryRequest.java
@@ -64,14 +64,16 @@ public class GridCacheTxRecoveryRequest extends GridDistributedBaseMessage {
* @param nearTxCheck {@code True} if should check only tx on near node.
* @param futId Future ID.
* @param miniId Mini future ID.
+ * @param addDepInfo Deployment info flag.
*/
public GridCacheTxRecoveryRequest(IgniteInternalTx tx,
int txNum,
boolean nearTxCheck,
IgniteUuid futId,
- IgniteUuid miniId)
+ IgniteUuid miniId,
+ boolean addDepInfo)
{
- super(tx.xidVersion(), 0);
+ super(tx.xidVersion(), 0, addDepInfo);
nearXidVer = tx.nearXidVersion();
sys = tx.system();
@@ -80,7 +82,6 @@ public class GridCacheTxRecoveryRequest extends GridDistributedBaseMessage {
this.miniId = miniId;
this.txNum = txNum;
this.nearTxCheck = nearTxCheck;
- this.addDepInfo = false;
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryResponse.java
index 32e8fbf..361d381 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryResponse.java
@@ -53,19 +53,21 @@ public class GridCacheTxRecoveryResponse extends GridDistributedBaseMessage {
* @param futId Future ID.
* @param miniId Mini future ID.
* @param success {@code True} if all remote transactions were prepared, {@code false} otherwise.
+ * @param addDepInfo Deployment info flag.
*/
public GridCacheTxRecoveryResponse(GridCacheVersion txId,
IgniteUuid futId,
IgniteUuid miniId,
- boolean success)
+ boolean success,
+ boolean addDepInfo)
{
- super(txId, 0);
+ super(txId, 0, addDepInfo);
this.futId = futId;
this.miniId = miniId;
this.success = success;
- this.addDepInfo = false;
+ this.addDepInfo = addDepInfo;
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
index 689cc62..f4a16dc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
@@ -86,19 +86,22 @@ public abstract class GridDistributedBaseMessage extends GridCacheMessage implem
/**
* @param cnt Count of keys references in list of candidates.
+ * @param addDepInfo Deployment info flag.
*/
- protected GridDistributedBaseMessage(int cnt) {
+ protected GridDistributedBaseMessage(int cnt, boolean addDepInfo) {
assert cnt >= 0;
this.cnt = cnt;
+ this.addDepInfo = addDepInfo;
}
/**
* @param ver Either lock or transaction version.
* @param cnt Key count.
+ * @param addDepInfo Deployment info flag.
*/
- protected GridDistributedBaseMessage(GridCacheVersion ver, int cnt) {
- this(cnt);
+ protected GridDistributedBaseMessage(GridCacheVersion ver, int cnt, boolean addDepInfo) {
+ this(cnt, addDepInfo);
assert ver != null;
@@ -122,6 +125,11 @@ public abstract class GridDistributedBaseMessage extends GridCacheMessage implem
candsByIdx = ctx.marshaller().unmarshal(candsByIdxBytes, ldr);
}
+ /** {@inheritDoc} */
+ @Override public boolean addDeploymentInfo() {
+ return addDepInfo;
+ }
+
/**
* @return Version.
*/
@@ -290,4 +298,4 @@ public abstract class GridDistributedBaseMessage extends GridCacheMessage implem
@Override public String toString() {
return S.toString(GridDistributedBaseMessage.class, this, "super", super.toString());
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
index 1963894..2899e25 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
@@ -118,6 +118,7 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage {
* @param keyCnt Number of keys.
* @param txSize Expected transaction size.
* @param skipStore Skip store flag.
+ * @param addDepInfo Deployment info flag.
*/
public GridDistributedLockRequest(
int cacheId,
@@ -133,9 +134,10 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage {
long timeout,
int keyCnt,
int txSize,
- boolean skipStore
+ boolean skipStore,
+ boolean addDepInfo
) {
- super(lockVer, keyCnt);
+ super(lockVer, keyCnt, addDepInfo);
assert keyCnt > 0;
assert futId != null;
@@ -551,4 +553,4 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage {
return S.toString(GridDistributedLockRequest.class, this, "keysCnt", retVals.length,
"super", super.toString());
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
index 8a95b14..cdd58b5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
@@ -72,12 +72,14 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage {
* @param lockVer Lock version.
* @param futId Future ID.
* @param cnt Key count.
+ * @param addDepInfo Deployment info.
*/
public GridDistributedLockResponse(int cacheId,
GridCacheVersion lockVer,
IgniteUuid futId,
- int cnt) {
- super(lockVer, cnt);
+ int cnt,
+ boolean addDepInfo) {
+ super(lockVer, cnt, addDepInfo);
assert futId != null;
@@ -92,12 +94,14 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage {
* @param lockVer Lock ID.
* @param futId Future ID.
* @param err Error.
+ * @param addDepInfo Deployment info.
*/
public GridDistributedLockResponse(int cacheId,
GridCacheVersion lockVer,
IgniteUuid futId,
- Throwable err) {
- super(lockVer, 0);
+ Throwable err,
+ boolean addDepInfo) {
+ super(lockVer, 0, addDepInfo);
assert futId != null;
@@ -112,13 +116,15 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage {
* @param futId Future ID.
* @param cnt Count.
* @param err Error.
+ * @param addDepInfo Deployment info.
*/
public GridDistributedLockResponse(int cacheId,
GridCacheVersion lockVer,
IgniteUuid futId,
int cnt,
- Throwable err) {
- super(lockVer, cnt);
+ Throwable err,
+ boolean addDepInfo) {
+ super(lockVer, cnt, addDepInfo);
assert futId != null;
@@ -325,4 +331,4 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage {
return S.toString(GridDistributedLockResponse.class, this,
"super", super.toString());
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
index ddf6799..34b3112 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
@@ -89,6 +89,7 @@ public class GridDistributedTxFinishRequest extends GridDistributedBaseMessage {
* @param committedVers Committed versions.
* @param rolledbackVers Rolled back versions.
* @param txSize Expected transaction size.
+ * @param addDepInfo Deployment info flag.
*/
public GridDistributedTxFinishRequest(
GridCacheVersion xidVer,
@@ -104,9 +105,10 @@ public class GridDistributedTxFinishRequest extends GridDistributedBaseMessage {
GridCacheVersion baseVer,
Collection<GridCacheVersion> committedVers,
Collection<GridCacheVersion> rolledbackVers,
- int txSize
+ int txSize,
+ boolean addDepInfo
) {
- super(xidVer, 0);
+ super(xidVer, 0, addDepInfo);
assert xidVer != null;
this.futId = futId;
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java
index 2cfafc1..4e17e79 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java
@@ -74,6 +74,11 @@ public class GridDistributedTxFinishResponse extends GridCacheMessage {
}
/** {@inheritDoc} */
+ @Override public boolean addDeploymentInfo() {
+ return false;
+ }
+
+ /** {@inheritDoc} */
@Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
writer.setBuffer(buf);
@@ -151,4 +156,4 @@ public class GridDistributedTxFinishResponse extends GridCacheMessage {
@Override public String toString() {
return GridToStringBuilder.toString(GridDistributedTxFinishResponse.class, this);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
index 5ba7128..8501e41 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
@@ -131,15 +131,17 @@ public class GridDistributedTxPrepareRequest extends GridDistributedBaseMessage
* @param writes Write entries.
* @param txNodes Transaction nodes mapping.
* @param onePhaseCommit One phase commit flag.
+ * @param addDepInfo Deployment info flag.
*/
public GridDistributedTxPrepareRequest(
IgniteInternalTx tx,
@Nullable Collection<IgniteTxEntry> reads,
Collection<IgniteTxEntry> writes,
Map<UUID, Collection<UUID>> txNodes,
- boolean onePhaseCommit
+ boolean onePhaseCommit,
+ boolean addDepInfo
) {
- super(tx.xidVersion(), 0);
+ super(tx.xidVersion(), 0, addDepInfo);
writeVer = tx.writeVersion();
threadId = tx.threadId();
@@ -605,4 +607,4 @@ public class GridDistributedTxPrepareRequest extends GridDistributedBaseMessage
return GridToStringBuilder.toString(GridDistributedTxPrepareRequest.class, this,
"super", super.toString());
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java
index e798458..d2c5aa4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java
@@ -52,17 +52,19 @@ public class GridDistributedTxPrepareResponse extends GridDistributedBaseMessage
/**
* @param xid Transaction ID.
+ * @param addDepInfo Deployment info flag.
*/
- public GridDistributedTxPrepareResponse(GridCacheVersion xid) {
- super(xid, 0);
+ public GridDistributedTxPrepareResponse(GridCacheVersion xid, boolean addDepInfo) {
+ super(xid, 0, addDepInfo);
}
/**
* @param xid Lock ID.
* @param err Error.
+ * @param addDepInfo Deployment info flag.
*/
- public GridDistributedTxPrepareResponse(GridCacheVersion xid, Throwable err) {
- super(xid, 0);
+ public GridDistributedTxPrepareResponse(GridCacheVersion xid, Throwable err, boolean addDepInfo) {
+ super(xid, 0, addDepInfo);
this.err = err;
}
@@ -168,4 +170,4 @@ public class GridDistributedTxPrepareResponse extends GridDistributedBaseMessage
return GridToStringBuilder.toString(GridDistributedTxPrepareResponse.class, this, "err",
err == null ? "null" : err.toString(), "super", super.toString());
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedUnlockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedUnlockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedUnlockRequest.java
index 70c83f2..213a0ff 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedUnlockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedUnlockRequest.java
@@ -54,9 +54,10 @@ public class GridDistributedUnlockRequest extends GridDistributedBaseMessage {
/**
* @param cacheId Cache ID.
* @param keyCnt Key count.
+ * @param addDepInfo Deployment info flag.
*/
- public GridDistributedUnlockRequest(int cacheId, int keyCnt) {
- super(keyCnt);
+ public GridDistributedUnlockRequest(int cacheId, int keyCnt, boolean addDepInfo) {
+ super(keyCnt, addDepInfo);
this.cacheId = cacheId;
}
@@ -159,4 +160,4 @@ public class GridDistributedUnlockRequest extends GridDistributedBaseMessage {
@Override public String toString() {
return S.toString(GridDistributedUnlockRequest.class, this, "super", super.toString());
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentRequest.java
index e6a5c9a..0ef7606 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentRequest.java
@@ -52,6 +52,11 @@ public class GridDhtAffinityAssignmentRequest extends GridCacheMessage {
}
/** {@inheritDoc} */
+ @Override public boolean addDeploymentInfo() {
+ return false;
+ }
+
+ /** {@inheritDoc} */
@Override public boolean partitionExchangeMessage() {
return true;
}
@@ -127,4 +132,4 @@ public class GridDhtAffinityAssignmentRequest extends GridCacheMessage {
@Override public String toString() {
return S.toString(GridDhtAffinityAssignmentRequest.class, this);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentResponse.java
index 2798d7c..42358d9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentResponse.java
@@ -135,6 +135,11 @@ public class GridDhtAffinityAssignmentResponse extends GridCacheMessage {
}
/** {@inheritDoc} */
+ @Override public boolean addDeploymentInfo() {
+ return false;
+ }
+
+ /** {@inheritDoc} */
@Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
writer.setBuffer(buf);
@@ -202,4 +207,4 @@ public class GridDhtAffinityAssignmentResponse extends GridCacheMessage {
@Override public String toString() {
return S.toString(GridDhtAffinityAssignmentResponse.class, this);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index 333bce2..ba1d753 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@ -694,7 +694,8 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
GridNearGetResponse res = new GridNearGetResponse(ctx.cacheId(),
req.futureId(),
req.miniId(),
- req.version());
+ req.version(),
+ ctx.deploymentEnabled());
GridDhtFuture<Collection<GridCacheEntryInfo>> fut =
(GridDhtFuture<Collection<GridCacheEntryInfo>>)f;
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
index 2c16534..4f3e97d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
@@ -866,7 +866,8 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
inTx() ? tx.subjectId() : null,
inTx() ? tx.taskNameHash() : 0,
read ? accessTtl : -1L,
- skipStore);
+ skipStore,
+ cctx.deploymentEnabled());
try {
for (ListIterator<GridDhtCacheEntry> it = dhtMapping.listIterator(); it.hasNext();) {
@@ -1236,4 +1237,4 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
return S.toString(MiniFuture.class, this, "nodeId", node.id(), "super", super.toString());
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
index 99c1b86..91ab1ca 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
@@ -120,6 +120,7 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
* @param taskNameHash Task name hash code.
* @param accessTtl TTL for read operation.
* @param skipStore Skip store flag.
+ * @param addDepInfo Deployment info flag.
*/
public GridDhtLockRequest(
int cacheId,
@@ -141,7 +142,8 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
@Nullable UUID subjId,
int taskNameHash,
long accessTtl,
- boolean skipStore
+ boolean skipStore,
+ boolean addDepInfo
) {
super(cacheId,
nodeId,
@@ -156,7 +158,8 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
timeout,
dhtCnt == 0 ? nearCnt : dhtCnt,
txSize,
- skipStore);
+ skipStore,
+ addDepInfo);
this.topVer = topVer;
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
index f79156b..1e92b54 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
@@ -75,9 +75,11 @@ public class GridDhtLockResponse extends GridDistributedLockResponse {
* @param futId Future ID.
* @param miniId Mini future ID.
* @param cnt Key count.
+ * @param addDepInfo Deployment info.
*/
- public GridDhtLockResponse(int cacheId, GridCacheVersion lockVer, IgniteUuid futId, IgniteUuid miniId, int cnt) {
- super(cacheId, lockVer, futId, cnt);
+ public GridDhtLockResponse(int cacheId, GridCacheVersion lockVer, IgniteUuid futId, IgniteUuid miniId, int cnt,
+ boolean addDepInfo) {
+ super(cacheId, lockVer, futId, cnt, addDepInfo);
assert miniId != null;
@@ -89,9 +91,11 @@ public class GridDhtLockResponse extends GridDistributedLockResponse {
* @param futId Future ID.
* @param miniId Mini future ID.
* @param err Error.
+ * @param addDepInfo
*/
- public GridDhtLockResponse(int cacheId, GridCacheVersion lockVer, IgniteUuid futId, IgniteUuid miniId, Throwable err) {
- super(cacheId, lockVer, futId, err);
+ public GridDhtLockResponse(int cacheId, GridCacheVersion lockVer, IgniteUuid futId, IgniteUuid miniId,
+ Throwable err, boolean addDepInfo) {
+ super(cacheId, lockVer, futId, err, addDepInfo);
assert miniId != null;
@@ -291,4 +295,4 @@ public class GridDhtLockResponse extends GridDistributedLockResponse {
@Override public String toString() {
return S.toString(GridDhtLockResponse.class, this, super.toString());
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
index 1a869e7..c09a611 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
@@ -408,7 +408,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
boolean cancelled = false;
try {
- res = new GridDhtLockResponse(ctx.cacheId(), req.version(), req.futureId(), req.miniId(), cnt);
+ res = new GridDhtLockResponse(ctx.cacheId(), req.version(), req.futureId(), req.miniId(), cnt,
+ ctx.deploymentEnabled());
dhtTx = startRemoteTx(nodeId, req, res);
nearTx = isNearEnabled(cacheCfg) ? near().startRemoteTx(nodeId, req) : null;
@@ -435,7 +436,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
U.error(log, err, e);
res = new GridDhtLockResponse(ctx.cacheId(), req.version(), req.futureId(), req.miniId(),
- new IgniteTxRollbackCheckedException(err, e));
+ new IgniteTxRollbackCheckedException(err, e), ctx.deploymentEnabled());
fail = true;
}
@@ -448,7 +449,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
req.version(),
req.futureId(),
req.miniId(),
- new IgniteCheckedException(err, e));
+ new IgniteCheckedException(err, e), ctx.deploymentEnabled());
fail = true;
}
@@ -1035,7 +1036,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
false,
0,
null,
- topVer);
+ topVer,
+ ctx.deploymentEnabled());
try {
ctx.io().send(nearNode, res, ctx.ioPolicy());
@@ -1080,7 +1082,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
tx != null && tx.onePhaseCommit(),
entries.size(),
err,
- null);
+ null,
+ ctx.deploymentEnabled());
if (err == null) {
res.pending(localDhtPendingVersions(entries, mappedVer));
@@ -1196,7 +1199,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
false,
entries.size(),
e,
- null);
+ null,
+ ctx.deploymentEnabled());
}
}
@@ -1522,7 +1526,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
List<KeyCacheObject> keyBytes = entry.getValue();
- GridDhtUnlockRequest req = new GridDhtUnlockRequest(ctx.cacheId(), keyBytes.size());
+ GridDhtUnlockRequest req = new GridDhtUnlockRequest(ctx.cacheId(), keyBytes.size(),
+ ctx.deploymentEnabled());
req.version(dhtVer);
@@ -1556,7 +1561,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
if (!dhtMap.containsKey(n)) {
List<KeyCacheObject> keyBytes = entry.getValue();
- GridDhtUnlockRequest req = new GridDhtUnlockRequest(ctx.cacheId(), keyBytes.size());
+ GridDhtUnlockRequest req = new GridDhtUnlockRequest(ctx.cacheId(), keyBytes.size(),
+ ctx.deploymentEnabled());
req.version(dhtVer);
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
index 0978ee5..caa0aa5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
@@ -104,7 +104,7 @@ public class GridDhtTxFinishRequest extends GridDistributedTxFinishRequest {
* @param txSize Expected transaction size.
* @param subjId Subject ID.
* @param taskNameHash Task name hash.
- * @param depEnabled Deployment enabled flag.
+ * @param addDepInfo Deployment info flag.
*/
public GridDhtTxFinishRequest(
UUID nearNodeId,
@@ -129,7 +129,7 @@ public class GridDhtTxFinishRequest extends GridDistributedTxFinishRequest {
int txSize,
@Nullable UUID subjId,
int taskNameHash,
- boolean depEnabled
+ boolean addDepInfo
) {
super(
xidVer,
@@ -145,7 +145,8 @@ public class GridDhtTxFinishRequest extends GridDistributedTxFinishRequest {
baseVer,
committedVers,
rolledbackVers,
- txSize);
+ txSize,
+ addDepInfo);
assert miniId != null;
assert nearNodeId != null;
@@ -159,7 +160,6 @@ public class GridDhtTxFinishRequest extends GridDistributedTxFinishRequest {
this.sysInvalidate = sysInvalidate;
this.subjId = subjId;
this.taskNameHash = taskNameHash;
- this.addDepInfo = depEnabled;
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishResponse.java
index 6361299..fb4d97d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishResponse.java
@@ -61,15 +61,13 @@ public class GridDhtTxFinishResponse extends GridDistributedTxFinishResponse {
* @param xid Xid version.
* @param futId Future ID.
* @param miniId Mini future ID.
- * @param depEnabled Deployment enabled.
*/
- public GridDhtTxFinishResponse(GridCacheVersion xid, IgniteUuid futId, IgniteUuid miniId, boolean depEnabled) {
+ public GridDhtTxFinishResponse(GridCacheVersion xid, IgniteUuid futId, IgniteUuid miniId) {
super(xid, futId);
assert miniId != null;
this.miniId = miniId;
- this.addDepInfo = depEnabled;
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
index 4204753..29d26f8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
@@ -117,7 +117,7 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
* @param txNodes Transaction nodes mapping.
* @param nearXidVer Near transaction ID.
* @param last {@code True} if this is last prepare request for node.
- * @param onePhaseCommit One phase commit flag.
+ * @param addDepInfo Deployment info flag.
*/
public GridDhtTxPrepareRequest(
IgniteUuid futId,
@@ -132,8 +132,8 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
boolean onePhaseCommit,
UUID subjId,
int taskNameHash,
- boolean depEnabled) {
- super(tx, null, dhtWrites, txNodes, onePhaseCommit);
+ boolean addDepInfo) {
+ super(tx, null, dhtWrites, txNodes, onePhaseCommit, addDepInfo);
assert futId != null;
assert miniId != null;
@@ -146,7 +146,6 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
this.last = last;
this.subjId = subjId;
this.taskNameHash = taskNameHash;
- this.addDepInfo = depEnabled;
invalidateNearEntries = new BitSet(dhtWrites == null ? 0 : dhtWrites.size());
@@ -274,8 +273,11 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
return owned;
}
- /** {@inheritDoc}
- * @param ctx*/
+ /**
+ * {@inheritDoc}
+ *
+ * @param ctx
+ */
@Override public void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException {
super.prepareMarshal(ctx);
@@ -284,16 +286,12 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
ownedVals = owned.values();
- for (IgniteTxKey key: ownedKeys)
+ for (IgniteTxKey key : ownedKeys)
key.prepareMarshal(ctx.cacheContext(key.cacheId()));
- if (ctx.deploymentEnabled()) {
- for (IgniteTxKey k : owned.keySet()) {
- GridCacheContext cctx = ctx.cacheContext(k.cacheId());
-
- if (cctx.deploymentEnabled())
- prepareObject(k, cctx);
- }
+ if (addDepInfo) {
+ for (IgniteTxKey k : owned.keySet())
+ prepareObject(k, ctx.cacheContext(k.cacheId()));
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareResponse.java
index 8d87fd1..2eba9f1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareResponse.java
@@ -84,17 +84,16 @@ public class GridDhtTxPrepareResponse extends GridDistributedTxPrepareResponse {
* @param xid Xid version.
* @param futId Future ID.
* @param miniId Mini future ID.
- * @param depEnabled Deployment enabled.
+ * @param addDepInfo Deployment info flag.
*/
- public GridDhtTxPrepareResponse(GridCacheVersion xid, IgniteUuid futId, IgniteUuid miniId, boolean depEnabled) {
- super(xid);
+ public GridDhtTxPrepareResponse(GridCacheVersion xid, IgniteUuid futId, IgniteUuid miniId, boolean addDepInfo) {
+ super(xid, addDepInfo);
assert futId != null;
assert miniId != null;
this.futId = futId;
this.miniId = miniId;
- this.addDepInfo = depEnabled;
}
/**
@@ -102,18 +101,17 @@ public class GridDhtTxPrepareResponse extends GridDistributedTxPrepareResponse {
* @param futId Future ID.
* @param miniId Mini future ID.
* @param err Error.
- * @param depEnabled Deployment enabled.
+ * @param addDepInfo Deployment enabled.
*/
public GridDhtTxPrepareResponse(GridCacheVersion xid, IgniteUuid futId, IgniteUuid miniId, Throwable err,
- boolean depEnabled) {
- super(xid, err);
+ boolean addDepInfo) {
+ super(xid, err, addDepInfo);
assert futId != null;
assert miniId != null;
this.futId = futId;
this.miniId = miniId;
- this.addDepInfo = depEnabled;
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnlockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnlockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnlockRequest.java
index e18dc33..38152a7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnlockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnlockRequest.java
@@ -52,9 +52,10 @@ public class GridDhtUnlockRequest extends GridDistributedUnlockRequest {
/**
* @param cacheId Cache ID.
* @param dhtCnt Key count.
+ * @param addDepInfo Deployment info flag.
*/
- public GridDhtUnlockRequest(int cacheId, int dhtCnt) {
- super(cacheId, dhtCnt);
+ public GridDhtUnlockRequest(int cacheId, int dhtCnt, boolean addDepInfo) {
+ super(cacheId, dhtCnt, addDepInfo);
}
/**
@@ -157,4 +158,4 @@ public class GridDhtUnlockRequest extends GridDistributedUnlockRequest {
@Override public byte fieldsCount() {
return 9;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
index abbe7b8..a68e834 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
@@ -409,7 +409,8 @@ public class GridPartitionedGetFuture<K, V> extends GridCompoundIdentityFuture<M
subjId,
taskName == null ? 0 : taskName.hashCode(),
expiryPlc != null ? expiryPlc.forAccess() : -1L,
- skipVals);
+ skipVals,
+ cctx.deploymentEnabled());
add(fut); // Append new future.
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/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 854a83d..cba6872 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
@@ -1087,9 +1087,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
GridNearAtomicUpdateRequest req,
CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse> completionCb
) {
- GridNearAtomicUpdateResponse res = new GridNearAtomicUpdateResponse(ctx.cacheId(),
- nodeId,
- req.futureVersion());
+ GridNearAtomicUpdateResponse res = new GridNearAtomicUpdateResponse(ctx.cacheId(), nodeId, req.futureVersion(),
+ ctx.deploymentEnabled());
List<KeyCacheObject> keys = req.keys();
@@ -2480,7 +2479,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
GridCacheVersion ver = req.writeVersion();
// Always send update reply.
- GridDhtAtomicUpdateResponse res = new GridDhtAtomicUpdateResponse(ctx.cacheId(), req.futureVersion());
+ GridDhtAtomicUpdateResponse res = new GridDhtAtomicUpdateResponse(ctx.cacheId(), req.futureVersion(),
+ ctx.deploymentEnabled());
Boolean replicate = ctx.isDrEnabled();
@@ -2936,7 +2936,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
*/
private void finish() {
GridDhtAtomicDeferredUpdateResponse msg = new GridDhtAtomicDeferredUpdateResponse(ctx.cacheId(),
- respVers);
+ respVers, ctx.deploymentEnabled());
try {
ctx.kernalContext().gateway().readLock();
@@ -2966,4 +2966,4 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
pendingResponses.remove(nodeId, this);
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicDeferredUpdateResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicDeferredUpdateResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicDeferredUpdateResponse.java
index f3ecdb4..3a7bf1c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicDeferredUpdateResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicDeferredUpdateResponse.java
@@ -58,13 +58,21 @@ public class GridDhtAtomicDeferredUpdateResponse extends GridCacheMessage implem
/**
* Constructor.
*
+ * @param cacheId Cache ID.
* @param futVers Future versions.
+ * @param addDepInfo Deployment info.
*/
- public GridDhtAtomicDeferredUpdateResponse(int cacheId, Collection<GridCacheVersion> futVers) {
+ public GridDhtAtomicDeferredUpdateResponse(int cacheId, Collection<GridCacheVersion> futVers, boolean addDepInfo) {
assert !F.isEmpty(futVers);
this.cacheId = cacheId;
this.futVers = futVers;
+ this.addDepInfo = addDepInfo;
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean addDeploymentInfo() {
+ return addDepInfo;
}
/**
@@ -133,4 +141,4 @@ public class GridDhtAtomicDeferredUpdateResponse extends GridCacheMessage implem
@Override public byte fieldsCount() {
return 4;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
index 35b8e27..4ace5c4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
@@ -233,7 +233,8 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter<Void>
forceTransformBackups,
this.updateReq.subjectId(),
this.updateReq.taskNameHash(),
- forceTransformBackups ? this.updateReq.invokeArguments() : null);
+ forceTransformBackups ? this.updateReq.invokeArguments() : null,
+ cctx.deploymentEnabled());
mappings.put(nodeId, updateReq);
}
@@ -288,7 +289,8 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter<Void>
forceTransformBackups,
this.updateReq.subjectId(),
this.updateReq.taskNameHash(),
- forceTransformBackups ? this.updateReq.invokeArguments() : null);
+ forceTransformBackups ? this.updateReq.invokeArguments() : null,
+ cctx.deploymentEnabled());
mappings.put(nodeId, updateReq);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
index 79e1993..62cc432 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
@@ -159,6 +159,7 @@ public class GridDhtAtomicUpdateRequest extends GridCacheMessage implements Grid
* @param forceTransformBackups Force transform backups flag.
* @param subjId Subject ID.
* @param taskNameHash Task name hash code.
+ * @param addDepInfo Deployment info.
*/
public GridDhtAtomicUpdateRequest(
int cacheId,
@@ -170,7 +171,8 @@ public class GridDhtAtomicUpdateRequest extends GridCacheMessage implements Grid
boolean forceTransformBackups,
UUID subjId,
int taskNameHash,
- Object[] invokeArgs
+ Object[] invokeArgs,
+ boolean addDepInfo
) {
assert invokeArgs == null || forceTransformBackups;
@@ -184,6 +186,7 @@ public class GridDhtAtomicUpdateRequest extends GridCacheMessage implements Grid
this.subjId = subjId;
this.taskNameHash = taskNameHash;
this.invokeArgs = invokeArgs;
+ this.addDepInfo = addDepInfo;
keys = new ArrayList<>();
@@ -580,6 +583,11 @@ public class GridDhtAtomicUpdateRequest extends GridCacheMessage implements Grid
}
/** {@inheritDoc} */
+ @Override public boolean addDeploymentInfo() {
+ return addDepInfo;
+ }
+
+ /** {@inheritDoc} */
@Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
writer.setBuffer(buf);
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
index 04d36e5..f1bb323 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
@@ -77,10 +77,12 @@ public class GridDhtAtomicUpdateResponse extends GridCacheMessage implements Gri
/**
* @param cacheId Cache ID.
* @param futVer Future version.
+ * @param addDepInfo Deployment info.
*/
- public GridDhtAtomicUpdateResponse(int cacheId, GridCacheVersion futVer) {
+ public GridDhtAtomicUpdateResponse(int cacheId, GridCacheVersion futVer, boolean addDepInfo) {
this.cacheId = cacheId;
this.futVer = futVer;
+ this.addDepInfo = addDepInfo;
}
/** {@inheritDoc} */
@@ -180,6 +182,11 @@ public class GridDhtAtomicUpdateResponse extends GridCacheMessage implements Gri
}
/** {@inheritDoc} */
+ @Override public boolean addDeploymentInfo() {
+ return addDepInfo;
+ }
+
+ /** {@inheritDoc} */
@Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
writer.setBuffer(buf);
@@ -285,4 +292,4 @@ public class GridDhtAtomicUpdateResponse extends GridCacheMessage implements Gri
@Override public String toString() {
return S.toString(GridDhtAtomicUpdateResponse.class, this);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index 97aa646..ae662c8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@ -583,7 +583,8 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
req = mappings != null ? mappings.get(nodeId) : null;
if (req != null) {
- res = new GridNearAtomicUpdateResponse(cctx.cacheId(), nodeId, req.futureVersion());
+ res = new GridNearAtomicUpdateResponse(cctx.cacheId(), nodeId, req.futureVersion(),
+ cctx.deploymentEnabled());
ClusterTopologyCheckedException e = new ClusterTopologyCheckedException("Primary node left grid " +
"before response is received: " + nodeId);
@@ -794,7 +795,8 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
synchronized (this) {
GridNearAtomicUpdateResponse res = new GridNearAtomicUpdateResponse(cctx.cacheId(),
req.nodeId(),
- req.futureVersion());
+ req.futureVersion(),
+ cctx.deploymentEnabled());
res.addFailedKeys(req.keys(), e);
@@ -1048,7 +1050,8 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
subjId,
taskNameHash,
skipStore,
- cctx.kernalContext().clientNode());
+ cctx.kernalContext().clientNode(),
+ cctx.deploymentEnabled());
pendingMappings.put(nodeId, mapped);
}
@@ -1140,7 +1143,8 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
subjId,
taskNameHash,
skipStore,
- cctx.kernalContext().clientNode());
+ cctx.kernalContext().clientNode(),
+ cctx.deploymentEnabled());
req.addUpdateEntry(cacheKey,
val,
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/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 594025c..f3b1404 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
@@ -178,6 +178,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements Gri
* @param taskNameHash Task name hash code.
* @param skipStore Skip write-through to a persistent storage.
* @param clientReq Client node request flag.
+ * @param addDepInfo Deployment info flag.
*/
public GridNearAtomicUpdateRequest(
int cacheId,
@@ -196,7 +197,8 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements Gri
@Nullable UUID subjId,
int taskNameHash,
boolean skipStore,
- boolean clientReq
+ boolean clientReq,
+ boolean addDepInfo
) {
assert futVer != null;
@@ -218,6 +220,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements Gri
this.taskNameHash = taskNameHash;
this.skipStore = skipStore;
this.clientReq = clientReq;
+ this.addDepInfo = addDepInfo;
keys = new ArrayList<>();
}
@@ -591,6 +594,11 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements Gri
}
/** {@inheritDoc} */
+ @Override public boolean addDeploymentInfo() {
+ return addDepInfo;
+ }
+
+ /** {@inheritDoc} */
@Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
writer.setBuffer(buf);
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
index 376f4ec..6536af3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
@@ -114,13 +114,15 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements Gr
* @param cacheId Cache ID.
* @param nodeId Node ID this reply should be sent to.
* @param futVer Future version.
+ * @param addDepInfo Deployment info flag.
*/
- public GridNearAtomicUpdateResponse(int cacheId, UUID nodeId, GridCacheVersion futVer) {
+ public GridNearAtomicUpdateResponse(int cacheId, UUID nodeId, GridCacheVersion futVer, boolean addDepInfo) {
assert futVer != null;
this.cacheId = cacheId;
this.nodeId = nodeId;
this.futVer = futVer;
+ this.addDepInfo = addDepInfo;
}
/** {@inheritDoc} */
@@ -428,6 +430,11 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements Gr
}
/** {@inheritDoc} */
+ @Override public boolean addDeploymentInfo() {
+ return addDepInfo;
+ }
+
+ /** {@inheritDoc} */
@Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
writer.setBuffer(buf);
@@ -631,4 +638,4 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements Gr
@Override public String toString() {
return S.toString(GridNearAtomicUpdateResponse.class, this, "parent");
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
index f38126d..6d69198 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
@@ -493,7 +493,8 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
GridNearUnlockRequest req = map.get(primary);
if (req == null) {
- map.put(primary, req = new GridNearUnlockRequest(ctx.cacheId(), keyCnt));
+ map.put(primary, req = new GridNearUnlockRequest(ctx.cacheId(), keyCnt,
+ ctx.deploymentEnabled()));
req.version(ver);
}
@@ -597,7 +598,8 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
GridNearUnlockRequest req = map.get(primary);
if (req == null) {
- map.put(primary, req = new GridNearUnlockRequest(ctx.cacheId(), keyCnt));
+ map.put(primary, req = new GridNearUnlockRequest(ctx.cacheId(), keyCnt,
+ ctx.deploymentEnabled()));
req.version(ver);
}
@@ -896,4 +898,4 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
@Override public String toString() {
return S.toString(GridDhtColocatedCache.class, this, super.toString());
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7051f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
index be09f54..53c2b63 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
@@ -849,7 +849,8 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
inTx() ? tx.taskNameHash() : 0,
read ? accessTtl : -1L,
skipStore,
- clientFirst);
+ clientFirst,
+ cctx.deploymentEnabled());
mapping.request(req);
}