murblanc commented on a change in pull request #1758:
URL: https://github.com/apache/lucene-solr/pull/1758#discussion_r472343024
##########
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:
If you don't provide thus level of service to plugins (single instance
running) you force them to somehow do it on their own. How would they even
start to do that? I'm strongly against exposing internal implementation
"details" such as ZK. Do we let plugins open TCP ports? Have their own ZK?
Tomorrow we might decide to run plug-in on other containers/VM's that are not
nodes. Will plugins have to reimplement another leader election or similar?
It is much cleaner and simpler to do it once in Solr.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]