ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [02/18] ignite git commit: IGNITE-6154 also fixed check for WAL record
Date Fri, 25 Aug 2017 08:39:44 GMT
IGNITE-6154 also fixed check for WAL record


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

Branch: refs/heads/ignite-6149
Commit: fa42218e52d07f8869ed7da6874525b2722f3fcf
Parents: 474ecb8
Author: Ivan Rakov <ivan.glukos@gmail.com>
Authored: Tue Aug 22 17:03:42 2017 +0300
Committer: Andrey Gura <agura@apache.org>
Committed: Tue Aug 22 20:49:07 2017 +0300

----------------------------------------------------------------------
 .../cache/persistence/GridCacheDatabaseSharedManager.java    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fa42218e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
index 0f0fb88..9f2e4a0 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
@@ -2129,6 +2129,8 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
 
             tracker.onLockWaitStart();
 
+            boolean hasPages;
+
             checkpointLock.writeLock().lock();
 
             try {
@@ -2193,7 +2195,9 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
 
                 cpPagesTuple = beginAllCheckpoints();
 
-                if (!F.isEmpty(cpPagesTuple.get1())) {
+                hasPages = hasPageForWrite(cpPagesTuple.get1());
+
+                if (hasPages) {
                     // No page updates for this checkpoint are allowed from now on.
                     cpPtr = cctx.wal().log(cpRec);
 
@@ -2209,7 +2213,7 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
 
             curr.cpBeginFut.onDone();
 
-            if (hasPageForWrite(cpPagesTuple.get1())) {
+            if (hasPages) {
                 assert cpPtr != null;
 
                 // Sync log outside the checkpoint write lock.


Mime
View raw message