Repository: ignite Updated Branches: refs/heads/ignite-1.3.3-p8 [created] 3a47d953a
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/3a47d953 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3a47d953 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3a47d953 Branch: refs/heads/ignite-1.3.3-p8 Commit: 3a47d953a1766ecdd0ccb4c489b8fad826509de9 Parents: 81e0c40 Author: Ilya Lantukh <[email protected]> Authored: Fri Feb 19 16:22:23 2016 +0300 Committer: vozerov-gridgain <[email protected]> Committed: Sat Feb 20 10:01: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/3a47d953/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 a078bed..53cb9f4 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 @@ -1040,7 +1040,7 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx { update(val, expireTime, ttl, newVer); - drReplicate(drType, val, newVer); + drReplicate(drType, val, newVer, topVer); recordNodeId(affNodeId, topVer); @@ -1189,7 +1189,7 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx { } } - drReplicate(drType, null, newVer); + drReplicate(drType, null, newVer, topVer); if (metrics && cctx.cache().configuration().isStatisticsEnabled()) cctx.cache().metrics0().onRemove(); @@ -2054,7 +2054,7 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx { update(updated, newExpireTime, newTtl, newVer); - drReplicate(drType, updated, newVer); + drReplicate(drType, updated, newVer, topVer); recordNodeId(affNodeId, topVer); @@ -2142,7 +2142,7 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx { recordNodeId(affNodeId, topVer); - drReplicate(drType, null, newVer); + drReplicate(drType, null, newVer, topVer); if (evt) { CacheObject evtOld = null; @@ -2286,12 +2286,13 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx { * @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); } /** @@ -2986,7 +2987,7 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx { else if (deletedUnlocked()) deletedUnlocked(false); - drReplicate(drType, val, ver); + drReplicate(drType, val, ver, topVer); if (!skipQryNtf) { if (cctx.isLocal() || cctx.isReplicated() || cctx.affinity().primary(cctx.localNode(), key, topVer)) http://git-wip-us.apache.org/repos/asf/ignite/blob/3a47d953/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 189ee33..755fcd1 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 @@ -42,6 +42,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, @@ -49,7 +50,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/3a47d953/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 00ed020..725aaec 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 @@ -70,7 +70,8 @@ public class GridOsCacheDrManager implements GridCacheDrManager { long ttl, long expireTime, GridCacheVersion ver, - GridDrType drType) { + GridDrType drType, + AffinityTopologyVersion topVer) { // No-op. }
