You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2016/02/20 12:46:48 UTC
[29/38] ignite git commit: Minor changes to GridCacheDrManager
interface to better propagate topology version.
Minor changes to GridCacheDrManager interface to better propagate topology version.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1463311c
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1463311c
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1463311c
Branch: refs/heads/ignite-961
Commit: 1463311cd1541122174111c4f0cc39aae7879ac9
Parents: bcaa0a8
Author: Ilya Lantukh <il...@gridgain.com>
Authored: Fri Feb 19 16:22:23 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Feb 19 16:22:23 2016 +0300
----------------------------------------------------------------------
.../internal/processors/cache/GridCacheMapEntry.java | 15 ++++++++-------
.../processors/cache/dr/GridCacheDrManager.java | 4 +++-
.../processors/cache/dr/GridOsCacheDrManager.java | 3 ++-
3 files changed, 13 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/1463311c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index e8652e7..1658b85 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -1203,7 +1203,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
update(val, expireTime, ttl, newVer, true);
- drReplicate(drType, val, newVer);
+ drReplicate(drType, val, newVer, topVer);
recordNodeId(affNodeId, topVer);
@@ -1391,7 +1391,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
if (updateCntr != null && updateCntr != 0)
updateCntr0 = updateCntr;
- drReplicate(drType, null, newVer);
+ drReplicate(drType, null, newVer, topVer);
if (metrics && cctx.cache().configuration().isStatisticsEnabled())
cctx.cache().metrics0().onRemove();
@@ -2359,7 +2359,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
if (updateCntr != null)
updateCntr0 = updateCntr;
- drReplicate(drType, updated, newVer);
+ drReplicate(drType, updated, newVer, topVer);
recordNodeId(affNodeId, topVer);
@@ -2457,7 +2457,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
if (updateCntr != null)
updateCntr0 = updateCntr;
- drReplicate(drType, null, newVer);
+ drReplicate(drType, null, newVer, topVer);
if (evt) {
CacheObject evtOld = null;
@@ -2600,12 +2600,13 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
* @param drType DR type.
* @param val Value.
* @param ver Version.
+ * @param topVer Topology version.
* @throws IgniteCheckedException In case of exception.
*/
- private void drReplicate(GridDrType drType, @Nullable CacheObject val, GridCacheVersion ver)
+ private void drReplicate(GridDrType drType, @Nullable CacheObject val, GridCacheVersion ver, AffinityTopologyVersion topVer)
throws IgniteCheckedException {
if (cctx.isDrEnabled() && drType != DR_NONE && !isInternal())
- cctx.dr().replicate(key, val, rawTtl(), rawExpireTime(), ver.conflictVersion(), drType);
+ cctx.dr().replicate(key, val, rawTtl(), rawExpireTime(), ver.conflictVersion(), drType, topVer);
}
/**
@@ -3275,7 +3276,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
if (!preload)
updateCntr = nextPartCounter(topVer);
- drReplicate(drType, val, ver);
+ drReplicate(drType, val, ver, topVer);
if (!skipQryNtf) {
cctx.continuousQueries().onEntryUpdated(
http://git-wip-us.apache.org/repos/asf/ignite/blob/1463311c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridCacheDrManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridCacheDrManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridCacheDrManager.java
index 67174ef..358f90c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridCacheDrManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridCacheDrManager.java
@@ -44,6 +44,7 @@ public interface GridCacheDrManager extends GridCacheManager {
* @param expireTime Expire time.
* @param ver Version.
* @param drType Replication type.
+ * @param topVer Topology version.
* @throws IgniteCheckedException If failed.
*/
public void replicate(KeyCacheObject key,
@@ -51,7 +52,8 @@ public interface GridCacheDrManager extends GridCacheManager {
long ttl,
long expireTime,
GridCacheVersion ver,
- GridDrType drType)throws IgniteCheckedException;
+ GridDrType drType,
+ AffinityTopologyVersion topVer)throws IgniteCheckedException;
/**
* Process partitions "before exchange" event.
http://git-wip-us.apache.org/repos/asf/ignite/blob/1463311c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridOsCacheDrManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridOsCacheDrManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridOsCacheDrManager.java
index 5ef2c9c..825769f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridOsCacheDrManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/dr/GridOsCacheDrManager.java
@@ -72,7 +72,8 @@ public class GridOsCacheDrManager implements GridCacheDrManager {
long ttl,
long expireTime,
GridCacheVersion ver,
- GridDrType drType) {
+ GridDrType drType,
+ AffinityTopologyVersion topVer) {
// No-op.
}