You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by al...@apache.org on 2019/12/20 11:10:33 UTC

[ignite] branch master updated: IGNITE-12442 Fix unnecessary sync on PagesList.PagesCache - Fixes #7147.

This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new dec87bf  IGNITE-12442 Fix unnecessary sync on PagesList.PagesCache - Fixes #7147.
dec87bf is described below

commit dec87bff617fea241bc7426d19335c465858b946
Author: Evgeny Stanilovskiy <es...@gridgain.com>
AuthorDate: Fri Dec 20 14:06:22 2019 +0300

    IGNITE-12442 Fix unnecessary sync on PagesList.PagesCache - Fixes #7147.
    
    Signed-off-by: Aleksey Plekhanov <pl...@gmail.com>
---
 .../internal/processors/cache/persistence/freelist/PagesList.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/PagesList.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/PagesList.java
index 19df27e..f90da40 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/PagesList.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/PagesList.java
@@ -1904,7 +1904,7 @@ public abstract class PagesList extends DataStructure {
         private volatile int size;
 
         /** Count of flush calls with empty cache. */
-        private volatile int emptyFlushCnt;
+        private int emptyFlushCnt;
 
         /**
          * Default constructor.
@@ -2024,9 +2024,10 @@ public abstract class PagesList extends DataStructure {
          * @param pageId Page id.
          * @return {@code True} if page can be added, {@code false} if list is full.
          */
-        public synchronized boolean add(long pageId) {
+        public boolean add(long pageId) {
             assert pageId != 0L;
 
+            // Ok with race here.
             if (size >= MAX_SIZE)
                 return false;