This is an automated email from the ASF dual-hosted git repository.
alexpl pushed a commit to branch ignite-2.8
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/ignite-2.8 by this push:
new 5916580 IGNITE-12442 Fix unnecessary sync on PagesList.PagesCache -
Fixes #7147.
5916580 is described below
commit 5916580f5135e71018e50b46a7d07520b22b4574
Author: Evgeny Stanilovskiy <[email protected]>
AuthorDate: Fri Dec 20 14:06:22 2019 +0300
IGNITE-12442 Fix unnecessary sync on PagesList.PagesCache - Fixes #7147.
Signed-off-by: Aleksey Plekhanov <[email protected]>
(cherry picked from commit dec87bff617fea241bc7426d19335c465858b946)
---
.../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;