Repository: incubator-ignite Updated Branches: refs/heads/ignite-9655-merge 908f97f16 -> f0b624701
IGNITE-9655 - Fixed retry logic. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f0b62470 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f0b62470 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f0b62470 Branch: refs/heads/ignite-9655-merge Commit: f0b624701975b1b2fe6c4a411190a5efe4902317 Parents: 908f97f Author: Alexey Goncharuk <agoncha...@gridgain.com> Authored: Thu Feb 12 19:52:54 2015 -0800 Committer: Alexey Goncharuk <agoncha...@gridgain.com> Committed: Thu Feb 12 19:52:54 2015 -0800 ---------------------------------------------------------------------- .../cache/distributed/dht/GridDhtTxPrepareFuture.java | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f0b62470/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java index e4e886e..4c6af2c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java @@ -641,6 +641,8 @@ public final class GridDhtTxPrepareFuture<K, V> extends GridCompoundIdentityFutu for (IgniteTxEntry<K, V> e : writes) { IgniteTxEntry<K, V> txEntry = tx.entry(e.txKey()); + GridCacheContext<K, V> cacheCtx = txEntry.context(); + assert txEntry != null : "Missing tx entry for key [tx=" + tx + ", key=" + e.txKey() + ']'; while (true) { @@ -670,6 +672,7 @@ public final class GridDhtTxPrepareFuture<K, V> extends GridCompoundIdentityFutu } catch (GridCacheEntryRemovedException ignored) { // Retry. + txEntry.cached(cacheCtx.cache().entryEx(txEntry.key()), txEntry.keyBytes()); } } } @@ -681,6 +684,8 @@ public final class GridDhtTxPrepareFuture<K, V> extends GridCompoundIdentityFutu if (res.hasOwnedValue(ver.getKey())) continue; + GridCacheContext<K, V> cacheCtx = txEntry.context(); + while (true) { try { GridCacheEntryEx<K, V> entry = txEntry.cached(); @@ -709,6 +714,7 @@ public final class GridDhtTxPrepareFuture<K, V> extends GridCompoundIdentityFutu } catch (GridCacheEntryRemovedException ignored) { // Retry. + txEntry.cached(cacheCtx.cache().entryEx(txEntry.key()), txEntry.keyBytes()); } } }