This is an automated email from the ASF dual-hosted git repository.
rishabhdaim pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/trunk by this push:
new f6cfb14a9e OAK-12289 : disabled blob id tracking for document node
store (#2987)
f6cfb14a9e is described below
commit f6cfb14a9e7be9c6e6f52032bada95d6fd39e223
Author: Rishabh Kumar <[email protected]>
AuthorDate: Wed Jul 1 08:02:58 2026 +0530
OAK-12289 : disabled blob id tracking for document node store (#2987)
* OAK-12289 : disabled blob id tracking for document node store
* OAK-12289 : fixed test case
---
oak-doc/src/site/markdown/osgi_config.md | 7 ++++---
oak-doc/src/site/markdown/plugins/blobstore.md | 8 +++++---
.../oak/plugins/blob/DocumentBlobTrackerRegistrationTest.java | 3 +++
.../jackrabbit/oak/plugins/document/DocumentNodeStoreService.java | 2 +-
4 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/oak-doc/src/site/markdown/osgi_config.md
b/oak-doc/src/site/markdown/osgi_config.md
index 89259d9fb0..6ee3e47fd0 100644
--- a/oak-doc/src/site/markdown/osgi_config.md
+++ b/oak-doc/src/site/markdown/osgi_config.md
@@ -229,8 +229,9 @@ blobTrackSnapshotIntervalInSecs (long) - 0
deletions will be visible to other cluster nodes or repositories connected to
the shared DatStore after this. This
should be less than the blobGcMaxAgeInSecs parameter above and the frequency
of blob gc. See [Blob
tracker][blobtracker].
-A value of `0` (the default since Oak 2.4.0) disables blob ID tracking
entirely for the Segment Node Store. To enable tracking,
-set this to a positive value (e.g. `43200` for 12 hours). Note that
DocumentNodeStore defaults to `43200`.
+A value of `0` disables blob ID tracking entirely. This has been the default
for both SegmentNodeStore and
+DocumentNodeStore since Oak 2.4.0.
+To enable tracking, set this to a positive value (e.g. `43200` for 12 hours).
<a name="document-node-store"></a>
#### DocumentNodeStore
@@ -262,7 +263,7 @@ docChildrenCachePercentage | 0 (was 3 until 1.5.6) |
Percentage of `cache` alloc
cacheSegmentCount | 16 | The number of segments in the LIRS cache | 1.0.15,
1.2.3, 1.3.0
cacheStackMoveDistance | 16 | The delay to move entries to the head of the
queue in the LIRS cache | 1.0.15, 1.2.3, 1.3.0
sharedDSRepoId | "" | Custom SharedDataStore repositoryId. Used when custom
blobstore configured. Should be unique among the repositories sharing the
datastore. | 1.2.11
-blobTrackSnapshotIntervalInSecs | 43200 (12 hrs) | The blob ids cached/tracked
locally are synchronized with the DataStore at this interval. Any additions and
deletions will be visible to other cluster nodes or repositories connected to
the shared DatStore after this. This should be less than the blobGcMaxAgeInSecs
parameter above and the frequency of blob gc. See [Blob tracker][blobtracker].
| 1.5.6
+blobTrackSnapshotIntervalInSecs | 0 | The blob ids cached/tracked locally are
synchronized with the DataStore at this interval. Any additions and deletions
will be visible to other cluster nodes or repositories connected to the shared
DatStore after this. This should be less than the blobGcMaxAgeInSecs parameter
above and the frequency of blob gc. A value of `0` disables blob ID tracking
(default since Oak 2.4.0). See [Blob tracker][blobtracker]. | 1.5.6
updateLimit | 100000 | The number of updates kept in memory until changes are
written to a branch in the DocumentStore | 1.7.0
leaseCheckMode | STRICT | The lease check mode. `STRICT` is the default and
will stop the DocumentNodeStore as soon as the lease expires. `LENIENT` will
give the background lease update a chance to renew the lease even when the
lease expired. This mode is only recommended for development, e.g. when
debugging an application and the lease may expire when the JVM is stopped at a
breakpoint. | 1.9.6
documentStoreType | MONGO | Set to "RDB" for `RDBDocumentStore`; will require
a configured Sling DataSource called `oak`. | 1.0
diff --git a/oak-doc/src/site/markdown/plugins/blobstore.md
b/oak-doc/src/site/markdown/plugins/blobstore.md
index 85773f6df4..e9e190d4c5 100644
--- a/oak-doc/src/site/markdown/plugins/blobstore.md
+++ b/oak-doc/src/site/markdown/plugins/blobstore.md
@@ -237,9 +237,11 @@ configured NodeStore services.
**Default behavior by NodeStore:**
* **SegmentNodeStore** (`SegmentNodeStoreService` /
`SegmentNodeStoreFactory`): blob ID tracking is **disabled by
- default** (`blobTrackSnapshotIntervalInSecs = 0`). To enable it, set a
positive value such as `43200` (12 hours).
-* **DocumentNodeStore**: blob ID tracking is **enabled by default** with a
12-hour sync interval
- (`blobTrackSnapshotIntervalInSecs = 43200`).
+ default** (`blobTrackSnapshotIntervalInSecs = 0`, default since Oak 2.4.0).
To enable it, set a positive value such as
+ `43200` (12 hours).
+* **DocumentNodeStore**: blob ID tracking is **disabled by default**
+ (`blobTrackSnapshotIntervalInSecs = 0`, default since Oak 2.4.0). To enable
it, set a positive value such as `43200`
+ (12 hours).
When tracking is disabled (interval = 0), blob IDs are not cached locally and
the warnings described below do
not apply. The full blob ID list is always retrieved directly from the
DataStore during GC.
diff --git
a/oak-it/src/test/java/org/apache/jackrabbit/oak/plugins/blob/DocumentBlobTrackerRegistrationTest.java
b/oak-it/src/test/java/org/apache/jackrabbit/oak/plugins/blob/DocumentBlobTrackerRegistrationTest.java
index 4e6a59b603..bc31f731a7 100644
---
a/oak-it/src/test/java/org/apache/jackrabbit/oak/plugins/blob/DocumentBlobTrackerRegistrationTest.java
+++
b/oak-it/src/test/java/org/apache/jackrabbit/oak/plugins/blob/DocumentBlobTrackerRegistrationTest.java
@@ -63,6 +63,9 @@ public class DocumentBlobTrackerRegistrationTest extends
AbstractBlobTrackerRegi
properties.put("repository.home", repoHome);
properties.put("mongouri", MongoUtils.URL);
properties.put("db", MongoUtils.DB);
+ // Explicitly enable blob ID tracking (default is 0/disabled since Oak
2.4.0).
+ // This test verifies tracker reinitialization which requires an
active tracker.
+ properties.put("blobTrackSnapshotIntervalInSecs", 3600L);
MockOsgi.setConfigForPid(context.bundleContext(),
DocumentNodeStoreService.class.getName(), properties);
service = context.registerInjectActivateService(new
DocumentNodeStoreService());
diff --git
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
index d73fd4db26..5ff80c2634 100644
---
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
+++
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
@@ -195,7 +195,7 @@ public class DocumentNodeStoreService {
/**
* Default interval for taking snapshots of locally tracked blob ids.
*/
- static final long DEFAULT_BLOB_SNAPSHOT_INTERVAL = 12 * 60 * 60;
+ static final long DEFAULT_BLOB_SNAPSHOT_INTERVAL = 0L;
/**
* Feature toggle name to enable prefetch operation in DocumentStore