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 da...@apache.org on 2026/04/29 10:53:59 UTC

(jackrabbit-oak) branch OAK-12197_2 updated (99f7b5e161 -> 9e6798ff23)

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

rishabhdaim pushed a change to branch OAK-12197_2
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


 discard 99f7b5e161 OAK-12197 : make caffeine evictions async when refreshAfterWrite is used
    omit 114f604bd6 OAK-12197 : make caffeine evictions always synchronous to aling with guava
     add 179d73869e OAK-12199 : fixed issue where we were silently dropped creation of persistent caches (#2877)
     add 57a2b05bfd Revert "OAK-12193 Large numbers of deleted Lucene documents cause trouble (#2873)"
     add d3e23042cc Revert "OAK-12181 - add metric when repository lock could not be renewed"
     add cdc00b2a73 OAK-12197 : make caffeine evictions always synchronous to aling with guava (#2879)
     add e38b98ff71 OAK-12200 : restored the exception handling logic to guava cache style (#2878)
     add 1b766a35cb Revert "OAK-12200 : restored the exception handling logic to guava cache style (#2878)"
     add bef6e367da Reapply "OAK-12200 : restored the exception handling logic to guava cache style (#2878)"
     new 9e6798ff23 OAK-12197 : make caffeine evictions async when refreshAfterWrite is used

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (99f7b5e161)
            \
             N -- N -- N   refs/heads/OAK-12197_2 (9e6798ff23)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../index/lucene/LuceneIndexProviderService.java   |   4 -
 .../index/lucene/DeleteMemoryUsageTest.java        | 308 ---------------------
 .../plugins/index/lucene/FilteredDeleteTest.java   | 206 --------------
 .../search/spi/editor/FulltextIndexEditor.java     |  61 +---
 .../oak/segment/azure/AzurePersistence.java        |  18 +-
 .../oak/segment/azure/v8/AzurePersistenceV8.java   |  20 +-
 .../oak/segment/azure/AzureRepositoryLockTest.java |  85 ------
 .../azure/v8/AzureRepositoryLockV8Test.java        |  79 ------
 .../jackrabbit/oak/segment/SegmentCache.java       |  16 +-
 .../jackrabbit/oak/segment/file/FileStore.java     |  16 +-
 .../segment/file/MetricsRemoteStoreMonitor.java    |   8 -
 .../segment/spi/monitor/RemoteStoreMonitor.java    |   2 -
 .../spi/monitor/RemoteStoreMonitorAdapter.java     |   5 -
 .../jackrabbit/oak/segment/SegmentCacheTest.java   |  16 ++
 .../file/MetricsRemoteStoreMonitorTest.java        |  18 +-
 .../persistentcache/CachingPersistenceTest.java    |  21 ++
 .../plugins/document/DocumentNodeStoreBuilder.java |  14 +-
 .../document/DocumentNodeStoreBuilderTest.java     |  97 +++++++
 18 files changed, 175 insertions(+), 819 deletions(-)
 delete mode 100644 oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/DeleteMemoryUsageTest.java
 delete mode 100644 oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/FilteredDeleteTest.java


(jackrabbit-oak) 01/01: OAK-12197 : make caffeine evictions async when refreshAfterWrite is used

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rishabhdaim pushed a commit to branch OAK-12197_2
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit 9e6798ff23124fe828057b125758de485a0b6b4a
Author: rishabhdaim <ri...@gmail.com>
AuthorDate: Wed Apr 29 16:15:10 2026 +0530

    OAK-12197 : make caffeine evictions async when refreshAfterWrite is used
---
 .../java/org/apache/jackrabbit/oak/cache/api/CacheBuilder.java    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/cache/api/CacheBuilder.java b/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/cache/api/CacheBuilder.java
index 7eb327de55..e87972b258 100644
--- a/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/cache/api/CacheBuilder.java
+++ b/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/cache/api/CacheBuilder.java
@@ -254,8 +254,12 @@ public final class CacheBuilder<K, V> {
 
     @SuppressWarnings({"unchecked", "rawtypes"})
     private Caffeine<K, V> configureCaffeineBuilder() {
-        Caffeine caffeineBuilder = Caffeine.newBuilder()
-                .executor(Runnable::run);
+        Caffeine caffeineBuilder = Caffeine.newBuilder();
+        if (refreshAfterWrite == null) {
+            // Caffeine uses one executor for both maintenance and refresh work.
+            // Run maintenance on the caller thread unless refresh must stay asynchronous.
+            caffeineBuilder = caffeineBuilder.executor(Runnable::run);
+        }
         if (initialCapacity >= 0) {
             caffeineBuilder = caffeineBuilder.initialCapacity(initialCapacity);
         }