HoustonPutman commented on code in PR #760:
URL: https://github.com/apache/solr/pull/760#discussion_r1356972638


##########
solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/BeforeReconnect.java:
##########
@@ -16,6 +16,17 @@
  */
 package org.apache.solr.common.cloud;
 
-public interface BeforeReconnect {
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.state.ConnectionState;
+import org.apache.curator.framework.state.ConnectionStateListener;
+
+public interface BeforeReconnect extends ConnectionStateListener {
   public void command();
+
+  @Override
+  default void stateChanged(CuratorFramework client, ConnectionState newState) 
{

Review Comment:
   I'm not really sure about any of these classes. It seems like `OnDisconnect` 
should do `!newState.isConnected()` instead of `newState == 
ConnectionState.LOST`... I have a slight memory about doing this stuff and 
there being reasons, but I can't remember why I did this... It definitely 
warrants a much more thorough look. I'm not even sure having a 
`BeforeReconnect` is a good idea. The curator APIs don't really give us a good 
way of implementing it.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to