ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [20/22] incubator-ignite git commit: # IGNITE-379 Call CacheStore.sessionEnd() on each operation.
Date Tue, 24 Mar 2015 04:27:57 GMT
# IGNITE-379 Call CacheStore.sessionEnd() on each operation.


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

Branch: refs/heads/ignite-496
Commit: d5786835849d3b292d274aa2781a323987240d27
Parents: 40af5fb
Author: sevdokimov <sevdokimov@gridgain.com>
Authored: Mon Mar 23 18:25:48 2015 +0300
Committer: sevdokimov <sevdokimov@gridgain.com>
Committed: Mon Mar 23 18:25:48 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheStoreManager.java  | 19 +++++++++++--------
 .../cache/GridCacheWriteBehindStore.java         |  2 +-
 2 files changed, 12 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5786835/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java
index cffa7a1..27428a7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java
@@ -270,7 +270,7 @@ public class GridCacheStoreManager extends GridCacheManagerAdapter {
                 throw new IgniteCheckedException(new CacheLoaderException(e));
             }
             finally {
-                endSession();
+                endSession(tx);
             }
 
             if (log.isDebugEnabled())
@@ -445,7 +445,7 @@ public class GridCacheStoreManager extends GridCacheManagerAdapter {
                 throw new IgniteCheckedException(new CacheLoaderException(e));
             }
             finally {
-                endSession();
+                endSession(tx);
             }
 
             if (log.isDebugEnabled())
@@ -498,7 +498,7 @@ public class GridCacheStoreManager extends GridCacheManagerAdapter {
                 throw new IgniteCheckedException(new CacheLoaderException(e));
             }
             finally {
-                endSession();
+                endSession(null);
             }
 
             if (log.isDebugEnabled())
@@ -554,7 +554,7 @@ public class GridCacheStoreManager extends GridCacheManagerAdapter {
                 throw new IgniteCheckedException(new CacheWriterException(e));
             }
             finally {
-                endSession();
+                endSession(tx);
             }
 
             if (log.isDebugEnabled())
@@ -617,7 +617,7 @@ public class GridCacheStoreManager extends GridCacheManagerAdapter {
                     throw new IgniteCheckedException(e);
                 }
                 finally {
-                    endSession();
+                    endSession(tx);
                 }
 
                 if (log.isDebugEnabled())
@@ -664,7 +664,7 @@ public class GridCacheStoreManager extends GridCacheManagerAdapter {
                 throw new IgniteCheckedException(new CacheWriterException(e));
             }
             finally {
-                endSession();
+                endSession(tx);
             }
 
             if (log.isDebugEnabled())
@@ -718,7 +718,7 @@ public class GridCacheStoreManager extends GridCacheManagerAdapter {
                 throw new IgniteCheckedException(e);
             }
             finally {
-                endSession();
+                endSession(tx);
             }
 
             if (log.isDebugEnabled())
@@ -785,9 +785,12 @@ public class GridCacheStoreManager extends GridCacheManagerAdapter {
     /**
      * Clears session holder.
      */
-    void endSession() {
+    void endSession(@Nullable IgniteInternalTx tx) {
         if (sesHolder != null)
             sesHolder.set(null);
+
+        if (tx == null)
+            store.sessionEnd(true);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d5786835/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheWriteBehindStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheWriteBehindStore.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheWriteBehindStore.java
index fd14721..5127392 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheWriteBehindStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheWriteBehindStore.java
@@ -702,7 +702,7 @@ public class GridCacheWriteBehindStore<K, V> implements CacheStore<K,
V>, Lifecy
         }
         finally {
             if (initSes && storeMgr != null)
-                storeMgr.endSession();
+                storeMgr.endSession(null);
         }
     }
 


Mime
View raw message