[ https://issues.apache.org/jira/browse/SOLR-6571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14152223#comment-14152223 ]
Mark Miller commented on SOLR-6571: ----------------------------------- To note, nothing I said in the issue related to this is meant to mean there are not improvements or helper classes or documentation improvements to be made. It's also not meant to mean this stuff is easy - it's not. You usually learn it properly by burning your fingers off one by one. We have some code that try's to make things better. Things like handling an expired ZooKeeper instance for you (you can't keep using the same one). Handling the common ConnectionLoss retry for you. Etc. There is still a lot we can probably do. Still, to properly code for ZooKeeper you have to understand ConnectionLoss and SessionExpiration pretty well - you can't really count on the code you are writing otherwise - or test it properly. Perhaps there are more javadocs that can be beefed up. The tiny corners around this stuff was not easy to glean from the ZK doc back when I tackled it either. > Need a znode watcher support class > ---------------------------------- > > Key: SOLR-6571 > URL: https://issues.apache.org/jira/browse/SOLR-6571 > Project: Solr > Issue Type: Improvement > Components: SolrCloud > Reporter: Timothy Potter > > When implementing SOLR-6249, [~noble.paul] points out that > ZkIndexSchemaReader doesn't watch the managed schema znode correctly and > should use a strategy similar to what ZkStateReader does so that watchers > persist across zk client connection failures: > The correct example is the constructor of ZkStateReader > zkClient = new SolrZkClient(zkServerAddress, zkClientTimeout, > zkClientConnectTimeout, > // on reconnect, reload cloud info > new OnReconnect() { > //implement stuff here > } > }); > this ensures that the watchers are persisted across reconnect. > We need a watch support class to help developers implement watchers correctly > instead of having some code do it correctly and other code not. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org