nfsantos commented on code in PR #1669:
URL: https://github.com/apache/jackrabbit-oak/pull/1669#discussion_r1740670806
##########
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/AheadOfTimeBlobDownloadingFlatFileStore.java:
##########
@@ -75,17 +80,35 @@ private
AheadOfTimeBlobDownloadingFlatFileStore(FlatFileStore ffs, CompositeInde
maxPrefetchWindowSize,
maxPrefetchWindowMB);
}
- }
+ }
+
+ static boolean isEnabledForIndexes(String indexesEnabledPrefix,
List<String> indexPaths) {
+ List<String> enableForIndexes = splitAndTrim(indexesEnabledPrefix);
+ for (String indexPath : indexPaths) {
+ if (enableForIndexes.stream().anyMatch(indexPath::startsWith)) {
+ return true;
Review Comment:
There is a test case for when `indexesEnabledPrefix` is empty, the function
correctly returns false. See the first case in the companion test class below.
The loop won't be executed if the string is empty and it will fall through to
the `return false` at the end.
--
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]