ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [15/47] incubator-ignite git commit: #ignite-629: Remove forceTransformBackups parameter from GridNearAtomicUpdateRequest.
Date Tue, 31 Mar 2015 16:40:31 GMT
#ignite-629: Remove forceTransformBackups parameter from GridNearAtomicUpdateRequest.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/3381630e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3381630e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3381630e

Branch: refs/heads/ignite-598
Commit: 3381630e7b1dc091d5f282353fa903c24af8765a
Parents: 3073a5e
Author: ivasilinets <vasilinetc.ira@gmail.com>
Authored: Sun Mar 29 21:47:28 2015 +0300
Committer: ivasilinets <vasilinetc.ira@gmail.com>
Committed: Sun Mar 29 21:47:28 2015 +0300

----------------------------------------------------------------------
 .../dht/atomic/GridDhtAtomicCache.java          | 26 -------
 .../dht/atomic/GridDhtAtomicUpdateFuture.java   |  2 -
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |  2 -
 .../dht/atomic/GridNearAtomicUpdateRequest.java | 78 ++++++--------------
 4 files changed, 22 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3381630e/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 ee59f9c..c376fa0 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
@@ -1109,8 +1109,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
                             return;
                         }
 
-                        checkClearForceTransformBackups(req, locked);
-
                         boolean hasNear = ctx.discovery().cacheNearNode(node, name());
 
                         GridCacheVersion ver = req.updateVersion();
@@ -1758,9 +1756,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
 
                         EntryProcessor<Object, Object, Object> entryProcessor = null;
 
-                        if (req.forceTransformBackups() && op == TRANSFORM)
-                            entryProcessor = (EntryProcessor<Object, Object, Object>)writeVal;
-
                         if (!readersOnly) {
                             dhtFut.addWriteEntry(entry,
                                 updRes.newValue(),
@@ -2567,27 +2562,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
     }
 
     /**
-     * Checks if entries being transformed are empty. Clears forceTransformBackup flag enforcing
-     * sending transformed value to backups if at least one empty entry is found.
-     *
-     * @param req Near atomic update request.
-     * @param locked Already locked entries (from the request).
-     */
-    @SuppressWarnings("ForLoopReplaceableByForEach")
-    private void checkClearForceTransformBackups(GridNearAtomicUpdateRequest req,
-        List<GridDhtCacheEntry> locked) {
-        if (ctx.writeThrough() && req.operation() == TRANSFORM) {
-            for (int i = 0; i < locked.size(); i++) {
-                if (!locked.get(i).hasValue()) {
-                    req.forceTransformBackups(false);
-
-                    return;
-                }
-            }
-        }
-    }
-
-    /**
      * @param nodeId Node ID to send message to.
      * @param ver Version to ack.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3381630e/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 4cd1fd8..2b1fa01 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
@@ -112,8 +112,6 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter<Void>
         this.completionCb = completionCb;
         this.updateRes = updateRes;
 
-        forceTransformBackups = updateReq.forceTransformBackups();
-
         if (log == null)
             log = U.logger(cctx.kernalContext(), logRef, GridDhtAtomicUpdateFuture.class);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3381630e/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 3b02461..50051fe 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
@@ -582,7 +582,6 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
                 syncMode,
                 op,
                 retval,
-                false,
                 expiryPlc,
                 invokeArgs,
                 filter,
@@ -705,7 +704,6 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
                             syncMode,
                             op,
                             retval,
-                            false,
                             expiryPlc,
                             invokeArgs,
                             filter,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3381630e/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 b19338a..3f68a46 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
@@ -120,9 +120,6 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements
Gri
     /** Flag indicating whether request contains primary keys. */
     private boolean hasPrimary;
 
-    /** Force transform backups flag. */
-    private boolean forceTransformBackups;
-
     /** Subject ID. */
     private UUID subjId;
 
@@ -148,7 +145,6 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements
Gri
      * @param syncMode Synchronization mode.
      * @param op Cache update operation.
      * @param retval Return value required flag.
-     * @param forceTransformBackups Force transform backups flag.
      * @param expiryPlc Expiry policy.
      * @param invokeArgs Optional arguments for entry processor.
      * @param filter Optional filter for atomic check.
@@ -165,7 +161,6 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements
Gri
         CacheWriteSynchronizationMode syncMode,
         GridCacheOperation op,
         boolean retval,
-        boolean forceTransformBackups,
         @Nullable ExpiryPolicy expiryPlc,
         @Nullable Object[] invokeArgs,
         @Nullable CacheEntryPredicate[] filter,
@@ -182,7 +177,6 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements
Gri
         this.syncMode = syncMode;
         this.op = op;
         this.retval = retval;
-        this.forceTransformBackups = forceTransformBackups;
         this.expiryPlc = expiryPlc;
         this.invokeArgs = invokeArgs;
         this.filter = filter;
@@ -478,20 +472,6 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements
Gri
         return hasPrimary;
     }
 
-    /**
-     * @return Force transform backups flag.
-     */
-    public boolean forceTransformBackups() {
-        return forceTransformBackups;
-    }
-
-    /**
-     * @param forceTransformBackups Force transform backups flag.
-     */
-    public void forceTransformBackups(boolean forceTransformBackups) {
-        this.forceTransformBackups = forceTransformBackups;
-    }
-
     /** {@inheritDoc}
      * @param ctx*/
     @Override public void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException
{
@@ -611,78 +591,72 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements
Gri
                 writer.incrementState();
 
             case 10:
-                if (!writer.writeBoolean("forceTransformBackups", forceTransformBackups))
-                    return false;
-
-                writer.incrementState();
-
-            case 11:
                 if (!writer.writeMessage("futVer", futVer))
                     return false;
 
                 writer.incrementState();
 
-            case 12:
+            case 11:
                 if (!writer.writeBoolean("hasPrimary", hasPrimary))
                     return false;
 
                 writer.incrementState();
 
-            case 13:
+            case 12:
                 if (!writer.writeObjectArray("invokeArgsBytes", invokeArgsBytes, MessageCollectionItemType.BYTE_ARR))
                     return false;
 
                 writer.incrementState();
 
-            case 14:
+            case 13:
                 if (!writer.writeCollection("keys", keys, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
 
-            case 15:
+            case 14:
                 if (!writer.writeByte("op", op != null ? (byte)op.ordinal() : -1))
                     return false;
 
                 writer.incrementState();
 
-            case 16:
+            case 15:
                 if (!writer.writeBoolean("retval", retval))
                     return false;
 
                 writer.incrementState();
 
-            case 17:
+            case 16:
                 if (!writer.writeUuid("subjId", subjId))
                     return false;
 
                 writer.incrementState();
 
-            case 18:
+            case 17:
                 if (!writer.writeByte("syncMode", syncMode != null ? (byte)syncMode.ordinal()
: -1))
                     return false;
 
                 writer.incrementState();
 
-            case 19:
+            case 18:
                 if (!writer.writeInt("taskNameHash", taskNameHash))
                     return false;
 
                 writer.incrementState();
 
-            case 20:
+            case 19:
                 if (!writer.writeMessage("topVer", topVer))
                     return false;
 
                 writer.incrementState();
 
-            case 21:
+            case 20:
                 if (!writer.writeMessage("updateVer", updateVer))
                     return false;
 
                 writer.incrementState();
 
-            case 22:
+            case 21:
                 if (!writer.writeCollection("vals", vals, MessageCollectionItemType.MSG))
                     return false;
 
@@ -761,14 +735,6 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements
Gri
                 reader.incrementState();
 
             case 10:
-                forceTransformBackups = reader.readBoolean("forceTransformBackups");
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 11:
                 futVer = reader.readMessage("futVer");
 
                 if (!reader.isLastRead())
@@ -776,7 +742,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements
Gri
 
                 reader.incrementState();
 
-            case 12:
+            case 11:
                 hasPrimary = reader.readBoolean("hasPrimary");
 
                 if (!reader.isLastRead())
@@ -784,7 +750,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements
Gri
 
                 reader.incrementState();
 
-            case 13:
+            case 12:
                 invokeArgsBytes = reader.readObjectArray("invokeArgsBytes", MessageCollectionItemType.BYTE_ARR,
byte[].class);
 
                 if (!reader.isLastRead())
@@ -792,7 +758,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements
Gri
 
                 reader.incrementState();
 
-            case 14:
+            case 13:
                 keys = reader.readCollection("keys", MessageCollectionItemType.MSG);
 
                 if (!reader.isLastRead())
@@ -800,7 +766,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements
Gri
 
                 reader.incrementState();
 
-            case 15:
+            case 14:
                 byte opOrd;
 
                 opOrd = reader.readByte("op");
@@ -812,7 +778,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements
Gri
 
                 reader.incrementState();
 
-            case 16:
+            case 15:
                 retval = reader.readBoolean("retval");
 
                 if (!reader.isLastRead())
@@ -820,7 +786,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements
Gri
 
                 reader.incrementState();
 
-            case 17:
+            case 16:
                 subjId = reader.readUuid("subjId");
 
                 if (!reader.isLastRead())
@@ -828,7 +794,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements
Gri
 
                 reader.incrementState();
 
-            case 18:
+            case 17:
                 byte syncModeOrd;
 
                 syncModeOrd = reader.readByte("syncMode");
@@ -840,7 +806,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements
Gri
 
                 reader.incrementState();
 
-            case 19:
+            case 18:
                 taskNameHash = reader.readInt("taskNameHash");
 
                 if (!reader.isLastRead())
@@ -848,7 +814,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements
Gri
 
                 reader.incrementState();
 
-            case 20:
+            case 19:
                 topVer = reader.readMessage("topVer");
 
                 if (!reader.isLastRead())
@@ -856,7 +822,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements
Gri
 
                 reader.incrementState();
 
-            case 21:
+            case 20:
                 updateVer = reader.readMessage("updateVer");
 
                 if (!reader.isLastRead())
@@ -864,7 +830,7 @@ public class GridNearAtomicUpdateRequest extends GridCacheMessage implements
Gri
 
                 reader.incrementState();
 
-            case 22:
+            case 21:
                 vals = reader.readCollection("vals", MessageCollectionItemType.MSG);
 
                 if (!reader.isLastRead())


Mime
View raw message