You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by th...@apache.org on 2022/02/17 08:09:49 UTC
[jackrabbit-oak] branch 1.22 updated: OAK-9634 CacheLIRS: test failure with ARM processor
This is an automated email from the ASF dual-hosted git repository.
thomasm pushed a commit to branch 1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/1.22 by this push:
new 96e0115 OAK-9634 CacheLIRS: test failure with ARM processor
96e0115 is described below
commit 96e01150d03834faad5d5ebcfb450d9521539a6f
Author: Thomas Mueller <th...@apache.org>
AuthorDate: Thu Feb 17 09:09:38 2022 +0100
OAK-9634 CacheLIRS: test failure with ARM processor
---
.../java/org/apache/jackrabbit/oak/cache/CacheLIRS.java | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/cache/CacheLIRS.java b/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/cache/CacheLIRS.java
index f100240..3f755a3 100644
--- a/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/cache/CacheLIRS.java
+++ b/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/cache/CacheLIRS.java
@@ -1160,10 +1160,7 @@ public class CacheLIRS<K, V> implements LoadingCache<K, V> {
old = e.value;
invalidate(key, hash, RemovalCause.REPLACED);
}
- e = new Entry<K, V>();
- e.key = key;
- e.value = value;
- e.memory = memory;
+ e = new Entry<K, V>(key, value, memory);
Entry<K, V>[] array = entries;
int mask = array.length - 1;
int index = hash & mask;
@@ -1468,7 +1465,7 @@ public class CacheLIRS<K, V> implements LoadingCache<K, V> {
/**
* The key.
*/
- K key;
+ final K key;
/**
* The value. Set to null for non-resident-cold entries.
@@ -1511,6 +1508,16 @@ public class CacheLIRS<K, V> implements LoadingCache<K, V> {
*/
Entry<K, V> mapNext;
+ Entry(K key, V value, int memory) {
+ this.key = key;
+ this.value = value;
+ this.memory = memory;
+ }
+
+ Entry() {
+ this(null, null, 0);
+ }
+
/**
* Whether this entry is hot. Cold entries are in one of the two queues.
*