You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/12/16 06:59:59 UTC
[7/7] 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/dea42fd3
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/dea42fd3
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/dea42fd3
Branch: refs/heads/ignite-1537
Commit: dea42fd32cd9213499fed5b88a26a4ed76887511
Parents: 4230ab0
Author: sboikov <sb...@gridgain.com>
Authored: Wed Dec 16 08:59:33 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Dec 16 08:59:33 2015 +0300
----------------------------------------------------------------------
.../transactions/IgniteTxLocalAdapter.java | 23 +++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/dea42fd3/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);