fabriziofortino commented on a change in pull request #370:
URL: https://github.com/apache/jackrabbit-oak/pull/370#discussion_r707264354



##########
File path: 
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexMBeanImpl.java
##########
@@ -122,13 +133,13 @@ public TabularData getIndexStats() throws IOException {
             TabularType tt = new 
TabularType(LuceneIndexMBeanImpl.class.getName(),
                     "Lucene Index Stats", IndexStats.TYPE, new 
String[]{"path"});
             tds = new TabularDataSupport(tt);
-            Set<String> indexes = indexTracker.getIndexNodePaths();
-            for (String path : indexes) {
+            // Use indexPathService to get list of all the lucene indexes.

Review comment:
       @nit0906 I think this change is sound from a logical perspective. I am 
wondering though if this can cause some performance issues. The 
`indexPathService` returns all the indexes, even the ones that are not used 
(eg: an old version of an index). When we call `indexTracker.acquireIndexNode` 
(line 142) the `IndexSearcher` gets initialized. If the index is not present it 
gets downloaded. We can potentially download a lot of indexes only to serve the 
stats.




-- 
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]


Reply via email to