thomasmueller commented on code in PR #1738:
URL: https://github.com/apache/jackrabbit-oak/pull/1738#discussion_r1776669036
##########
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/CompositeIndexer.java:
##########
@@ -86,6 +87,13 @@ public Set<String> getRelativeIndexedNodeNames() {
return result;
}
+ @Override
+ public String getIndexName() {
+ // This is susceptible to infinite recursion if a composite indexer
contains itself, directly or indirectly.
Review Comment:
I like the comment (I wasn't aware of that), however in my view the comment
is in the wrong location... Could you move it to the top of the class please
(just before "public class CompositeIndexer")? Let me try to make a proposal...
##########
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/CompositeIndexer.java:
##########
@@ -86,6 +87,13 @@ public Set<String> getRelativeIndexedNodeNames() {
return result;
}
+ @Override
+ public String getIndexName() {
+ // This is susceptible to infinite recursion if a composite indexer
contains itself, directly or indirectly.
Review Comment:
```suggestion
// Many methods are susceptible to infinite recursion if a composite
indexer contains itself, directly or indirectly.
// In this case, the methods would throw a StackOverflowException
```
##########
oak-run-elastic/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/ElasticIndexer.java:
##########
@@ -126,6 +126,11 @@ public Set<String> getRelativeIndexedNodeNames() {
return definition.getRelativeNodeNames();
}
+ @Override
+ public String getIndexName() {
+ return definition.getIndexName();
Review Comment:
I think the usage of getIndexName() is fine. However, just FYI:
For on-prem and managed services, we support the same node name in multiple
locations. For example it's possible to have
* /oak:index/damAssetLucene
* /content/dam/oak:index/damAssetLucene
both in the same repository.
It is unlikely that this causes issues for this case here however (in my
view).
--
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]