thomasmueller commented on code in PR #3110:
URL: https://github.com/apache/jackrabbit-oak/pull/3110#discussion_r4002765549
##########
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LucenePropertyIndex.java:
##########
@@ -735,6 +735,13 @@ protected LuceneIndexNode acquireIndexNode(String
indexPath) {
if (NON_LAZY) {
return tracker.acquireIndexNode(indexPath);
}
+ if (!tracker.isIndexReady(indexPath)) {
Review Comment:
NON_LAZY is true in 99% of the cases, so this change, in reality, has no
effect
##########
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexProviderService.java:
##########
@@ -390,12 +395,20 @@ private void activate(BundleContext bundleContext,
Configuration config) throws
oakRegs.add(whiteboard.register(FeatureToggle.class,
new FeatureToggle(LuceneDocumentMaker.FT_OAK_12372,
LuceneDocumentMaker.FT_OAK_12372_DISABLE),
emptyMap()));
- oakRegs.add(whiteboard.register(FeatureToggle.class,
- new FeatureToggle(FulltextIndexEditor.FT_OAK_12365,
FulltextIndexEditor.FT_OAK_12365_DISABLE),
- emptyMap()));
initializeIndexDir(bundleContext, config);
initializeExtractedTextCache(bundleContext, config,
statisticsProvider);
tracker = createTracker(bundleContext, config);
+
+ oakRegs.add(whiteboard.register(FeatureToggle.class,
+ new FeatureToggle("FT_OAK-12173", FT_OAK_12173),
+ emptyMap()));
+ if (FT_OAK_12173.get()) {
+ // OAK-12173: update the tracker now, so indexes built before this
+ // service started can be used right away. Without this, we'd have
+ // to wait for the Observer below, which can be slow to start.
+ tracker.update(nodeStore.getRoot());
Review Comment:
If I understand correctly, this is the main / only change in the behavior,
right?
But it only covers indexes that were created during startup of this process?
I don't think this would be an important use case...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]