murblanc commented on a change in pull request #1758: URL: https://github.com/apache/lucene-solr/pull/1758#discussion_r473052101
########## File path: solr/core/src/java/org/apache/solr/cluster/events/ClusterSingleton.java ########## @@ -0,0 +1,14 @@ +package org.apache.solr.cluster.events; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +/** + * Intended for {@link org.apache.solr.core.CoreContainer} plugins that should be + * enabled only one instance per cluster. + * <p>Implementation detail: currently these plugins are instantiated on the + * Overseer leader, and closed when the current node loses its leadership.</p> + */ +@Retention(RetentionPolicy.RUNTIME) +public @interface ClusterSingleton { Review comment: Ok, I agree about keeping module dependencies clean. Didn't realize "Solr-core" meant just a module in the project. We do need some code in `solr-core` though, at least interfaces to be able to interact with other modules without depending on them (+ dependency injection or configuration to instantiate actual concrete classes). I believe that understanding what's really needed happens when the interfaces and the configuration is wired into Solr in some place or another, then we should move out of solr-core everything left there without reason (thinking of [PR 1684](https://github.com/apache/lucene-solr/pull/1684/files) as I write this comment, likely the impl and plugin packages there can be moved out of solr-core. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org