Repository: ignite
Updated Branches:
  refs/heads/ignite-1.5.7 0bdd56f97 -> 66bc778da


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/66bc778d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/66bc778d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/66bc778d

Branch: refs/heads/ignite-1.5.7
Commit: 66bc778da0a23d0fe5fd5630efb203109c4a40b1
Parents: 0bdd56f
Author: Ilya Lantukh <[email protected]>
Authored: Fri Feb 19 16:22:23 2016 +0300
Committer: vozerov-gridgain <[email protected]>
Committed: Fri Feb 19 16:25:14 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/66bc778d/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 6e951e9..3c6efdf 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
@@ -1197,7 +1197,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);
 
@@ -1385,7 +1385,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();
@@ -2353,7 +2353,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);
 
@@ -2451,7 +2451,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;
@@ -2594,12 +2594,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);
     }
 
     /**
@@ -3303,7 +3304,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/66bc778d/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/66bc778d/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.
     }
 

Reply via email to