You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by an...@apache.org on 2015/12/16 11:28:48 UTC
[08/10] ignite git commit: ignite-1.5 Fixed tx entry add to always
check for enlistWrite errors.
ignite-1.5 Fixed tx entry add to always check for enlistWrite errors.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/490f552b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/490f552b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/490f552b
Branch: refs/heads/ignite-843-rc2
Commit: 490f552b7a7a205a5dc2d34051c365ccc8e9f205
Parents: 77c6d08
Author: sboikov <sb...@gridgain.com>
Authored: Wed Dec 16 11:50:03 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Dec 16 11:50:03 2015 +0300
----------------------------------------------------------------------
.../transactions/IgniteTxLocalAdapter.java | 23 +++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/490f552b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index a3aed34..720832e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -2952,6 +2952,9 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
if (pessimistic()) {
assert loadFut == null || loadFut.isDone() : loadFut;
+ if (loadFut != null)
+ loadFut.get();
+
final Collection<KeyCacheObject> enlisted = Collections.singleton(cacheKey);
if (log.isDebugEnabled())
@@ -3124,6 +3127,15 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
if (pessimistic()) {
assert loadFut == null || loadFut.isDone() : loadFut;
+ if (loadFut != null) {
+ try {
+ loadFut.get();
+ }
+ catch (IgniteCheckedException e) {
+ return new GridFinishedFuture(e);
+ }
+ }
+
if (log.isDebugEnabled())
log.debug("Before acquiring transaction lock for put on keys: " + enlisted);
@@ -3382,7 +3394,16 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
// Otherwise, during rollback we will not know whether locks need
// to be rolled back.
if (pessimistic()) {
- assert loadFut.isDone() : loadFut;
+ assert loadFut == null || loadFut.isDone() : loadFut;
+
+ if (loadFut != null) {
+ try {
+ loadFut.get();
+ }
+ catch (IgniteCheckedException e) {
+ return new GridFinishedFuture<>(e);
+ }
+ }
if (log.isDebugEnabled())
log.debug("Before acquiring transaction lock for remove on keys: " + enlisted);