[ https://issues.apache.org/jira/browse/SOLR-5474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13832240#comment-13832240 ]
Noble Paul edited comment on SOLR-5474 at 11/26/13 3:08 AM: ------------------------------------------------------------ As part of SOLR-5473 the ZKStateReader will have an option of not watching clusterstate.json. This option could be enabled with a flag. The LazyCloudSolrServer can piggyback on the new ZkStateReader The \_target_ param would help the client know of a node goes down . But if a new replica comes up , the client would not know about the new replica till the cache gets invalidated by a * timeout * INAVLID_NODE from the server * connection timeout to a replica of any node in that colection An alternative would be the send the [zk version|http://zookeeper.apache.org/doc/r3.4.1/api/org/apache/zookeeper/data/Stat.html#getVersion()] as a parameter . example \_stateVer_=collx:234 . If there is a version mismatch or the node does not serve the 'collx' respond with INVALID_STATE error The DocCollection Object would have a new method getZkVersion() which gives the current version of the zk Object from which the DocCollection is created was (Author: noble.paul): As part of SOLR-5473 the ZKStateReader will have an option of not watching clusterstate.json. This option could be enabled with a flag. The LazyCloudSolrServer can piggyback on the new ZkStateReader The \_target_ param would help the client know of a node goes down . But if a new replica comes up , the client would not know about the new replica till the cache gets invalidated by a * timeout * INAVLID_NODE from the server * connection timeout to a replica of any node in that colection An alternative would be the send the [zk version|http://zookeeper.apache.org/doc/r3.4.1/api/org/apache/zookeeper/data/Stat.html#getVersion()] as a parameter example \_stateVer_=collx:234 . If there is a version mismatch or the node does not serve the 'collx' respond with INVALID_STATE error The DocCollection Object would have a new method getZkVersion() which gives the current version of the zk Object from which the DocCollection is created > Have a new mode for SolrJ to not watch any ZKNode > ------------------------------------------------- > > Key: SOLR-5474 > URL: https://issues.apache.org/jira/browse/SOLR-5474 > Project: Solr > Issue Type: Sub-task > Components: SolrCloud > Reporter: Noble Paul > > In this mode SolrJ would not watch any ZK node > It fetches the state on demand and cache the most recently used n > collections in memory. > SolrJ would not listen to any ZK node. When a request comes for a collection > ‘xcoll’ > it would first check if such a collection exists > If yes it first looks up the details in the local cache for that collection > If not found in cache , it fetches the node /collections/xcoll/state.json and > caches the information > Any query/update will be sent with extra query param specifying the > collection name , shard name, Role (Leader/Replica), and range (example > \_target_=xcoll:shard1:L:80000000-b332ffff) . A node would throw an error > (INVALID_NODE) if it does not the serve the collection/shard/Role/range combo. > If SolrJ gets INVALID_NODE error it would invalidate the cache and fetch > fresh state information for that collection (and caches it again) > If there is a connection timeout, SolrJ assumes the node is down and re-fetch > the state for the collection and try again -- This message was sent by Atlassian JIRA (v6.1#6144) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org