IGNITE-52 - Merge branch sprint-1 into ignite-52
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b5b6c3ec Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b5b6c3ec Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b5b6c3ec Branch: refs/heads/sprint-1 Commit: b5b6c3ec0ea0074329c29259ce6485eeb3ddfe00 Parents: 81b19c4 Author: Alexey Goncharuk <agoncha...@gridgain.com> Authored: Thu Feb 12 12:03:30 2015 -0800 Committer: Alexey Goncharuk <agoncha...@gridgain.com> Committed: Thu Feb 12 12:03:30 2015 -0800 ---------------------------------------------------------------------- .../processors/cache/GridCacheAdapter.java | 1 - .../processors/cache/GridCacheMapEntry.java | 4 +- .../distributed/near/GridNearGetRequest.java | 48 ++++++++------------ .../IgniteCacheContainsKeyAbstractSelfTest.java | 4 +- 4 files changed, 24 insertions(+), 33 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b5b6c3ec/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java index 32ac6bb..7a23b3c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java @@ -5311,7 +5311,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, null, null, null, - null, null); if (val == null) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b5b6c3ec/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 c0d99b9..9c83852 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 @@ -1401,7 +1401,7 @@ public abstract class GridCacheMapEntry<K, V> implements GridCacheEntryEx<K, V> boolean pass = cctx.isAll(wrapFilterLocked(), filter); if (!pass) { - if (expiryPlc != null && !readThrough && filter != cctx.noPeekArray() && hasValueUnlocked()) { + if (expiryPlc != null && !cctx.readThrough() && filter != cctx.noPeekArray() && hasValueUnlocked()) { long ttl = CU.toTtl(expiryPlc.getExpiryForAccess()); if (ttl != CU.TTL_NOT_CHANGED) @@ -1440,7 +1440,7 @@ public abstract class GridCacheMapEntry<K, V> implements GridCacheEntryEx<K, V> } if (!entry.modified()) { - if (expiryPlc != null && !readThrough && hasValueUnlocked()) { + if (expiryPlc != null && !cctx.readThrough() && hasValueUnlocked()) { long newTtl = CU.toTtl(expiryPlc.getExpiryForAccess()); if (newTtl != CU.TTL_NOT_CHANGED) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b5b6c3ec/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java index 31b8798..0aca49b 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java @@ -27,7 +27,6 @@ import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.lang.*; import org.apache.ignite.plugin.extensions.communication.*; -import javax.cache.*; import java.io.*; import java.nio.*; import java.util.*; @@ -292,70 +291,64 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements state++; case 4: - if (!writer.writeObjectArray("filterBytes", filterBytes, byte[].class)) - return false; - - state++; - - case 5: if (!writer.writeIgniteUuid("futId", futId)) return false; state++; - case 6: + case 5: if (!writer.writeMap("keyBytes", keyBytes, byte[].class, boolean.class)) return false; state++; - case 7: + case 6: if (!writer.writeIgniteUuid("miniId", miniId)) return false; state++; - case 8: + case 7: if (!writer.writeBoolean("readThrough", readThrough)) return false; state++; - case 9: + case 8: if (!writer.writeBoolean("reload", reload)) return false; state++; - case 10: + case 9: if (!writer.writeUuid("subjId", subjId)) return false; state++; - case 11: + case 10: if (!writer.writeInt("taskNameHash", taskNameHash)) return false; state++; - case 12: + case 11: if (!writer.writeLong("topVer", topVer)) return false; state++; - case 13: + case 12: if (!writer.writeMessage("ver", ver)) return false; state++; case 13: - if (!commState.putBoolean(skipVals)) + if (!writer.writeBoolean("skipVals", skipVals)) return false; - commState.idx++; + state++; } return true; @@ -379,7 +372,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements state++; case 4: - filterBytes = reader.readObjectArray("filterBytes", byte[].class); + futId = reader.readIgniteUuid("futId"); if (!reader.isLastRead()) return false; @@ -387,7 +380,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements state++; case 5: - futId = reader.readIgniteUuid("futId"); + keyBytes = reader.readMap("keyBytes", byte[].class, boolean.class, true); if (!reader.isLastRead()) return false; @@ -395,7 +388,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements state++; case 6: - keyBytes = reader.readMap("keyBytes", byte[].class, boolean.class, true); + miniId = reader.readIgniteUuid("miniId"); if (!reader.isLastRead()) return false; @@ -403,7 +396,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements state++; case 7: - miniId = reader.readIgniteUuid("miniId"); + readThrough = reader.readBoolean("readThrough"); if (!reader.isLastRead()) return false; @@ -411,7 +404,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements state++; case 8: - readThrough = reader.readBoolean("readThrough"); + reload = reader.readBoolean("reload"); if (!reader.isLastRead()) return false; @@ -419,7 +412,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements state++; case 9: - reload = reader.readBoolean("reload"); + subjId = reader.readUuid("subjId"); if (!reader.isLastRead()) return false; @@ -427,7 +420,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements state++; case 10: - subjId = reader.readUuid("subjId"); + taskNameHash = reader.readInt("taskNameHash"); if (!reader.isLastRead()) return false; @@ -435,7 +428,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements state++; case 11: - taskNameHash = reader.readInt("taskNameHash"); + topVer = reader.readLong("topVer"); if (!reader.isLastRead()) return false; @@ -443,7 +436,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements state++; case 12: - topVer = reader.readLong("topVer"); + ver = reader.readMessage("ver"); if (!reader.isLastRead()) return false; @@ -451,13 +444,12 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K, V> implements state++; case 13: - ver = reader.readMessage("ver"); + skipVals = reader.readBoolean("skipVals"); if (!reader.isLastRead()) return false; state++; - } return true; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b5b6c3ec/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAbstractSelfTest.java index 987551f..3043041 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheContainsKeyAbstractSelfTest.java @@ -43,11 +43,11 @@ public abstract class IgniteCacheContainsKeyAbstractSelfTest extends GridCacheAb cfg.setCommunicationSpi(commSpi); - TransactionsConfiguration tcfg = new TransactionsConfiguration(); + TransactionConfiguration tcfg = new TransactionConfiguration(); tcfg.setTxSerializableEnabled(true); - cfg.setTransactionsConfiguration(tcfg); + cfg.setTransactionConfiguration(tcfg); return cfg; }