ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject ignite git commit: IGNITE-6778 Fixed assertion in checkpointer entry sort
Date Thu, 02 Nov 2017 13:45:53 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-6778 f46672ea2 -> 61f4e8f14


IGNITE-6778 Fixed assertion in checkpointer entry sort


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

Branch: refs/heads/ignite-6778
Commit: 61f4e8f1438e2bdc3b3ef641f9a5298e6043e29a
Parents: f46672e
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Thu Nov 2 16:45:45 2017 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Thu Nov 2 16:45:45 2017 +0300

----------------------------------------------------------------------
 .../cache/persistence/GridCacheDatabaseSharedManager.java | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/61f4e8f1/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 6914054..e07aef7 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
@@ -1975,6 +1975,9 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
         /** Shutdown now. */
         private volatile boolean shutdownNow;
 
+        /** */
+        private long lastCpTs;
+
         /**
          * @param gridName Grid name.
          * @param name Thread name.
@@ -2364,6 +2367,13 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
 
                 long cpTs = System.currentTimeMillis();
 
+                // This can happen in an unlikely event of two checkpoints happening
+                // within a currentTimeMillis() granularity window.
+                if (cpTs == lastCpTs)
+                    cpTs++;
+
+                lastCpTs = cpTs;
+
                 CheckpointEntry cpEntry = writeCheckpointEntry(
                     tmpWriteBuf,
                     cpTs,


Mime
View raw message