SolrCloud clusterstate.json layout changes

2012-09-19 Thread Yonik Seeley
Folks,

Some changes have been committed in the past few days related to
SOLR-3815 as part of the groundwork
for SOLR-3755 (shard splitting).

The resulting clusterstate.json now looks like the following:

{collection1:{
shard1:{
  range:8000-,
  replicas:{Rogue:8983_solr_collection1:{
  shard:shard1,
  roles:null,
  state:active,
  core:collection1,
  collection:collection1,
  node_name:Rogue:8983_solr,
  base_url:http://Rogue:8983/solr;,
  leader:true}}},
shard2:{
  range:0-7fff,
  replicas:{


Note the addition of the replicas level to make room for other
properties at the shard level such as range (which define what hash
range belongs in what shard).
Although range now exists, it is ignored by the current code (i.e.
indexing still uses hash MOD nShards to place documents).

-Yonik
http://lucidworks.com


Re: SolrCloud clusterstate.json layout changes

2012-09-19 Thread Yonik Seeley
On Wed, Sep 19, 2012 at 5:27 PM, Yonik Seeley yo...@lucidworks.com wrote:
 Folks,

 Some changes have been committed in the past few days related to
 SOLR-3815 as part of the groundwork
 for SOLR-3755 (shard splitting).

 The resulting clusterstate.json now looks like the following:

 {collection1:{
 shard1:{
   range:8000-,
   replicas:{Rogue:8983_solr_collection1:{
   shard:shard1,
   roles:null,
   state:active,
   core:collection1,
   collection:collection1,
   node_name:Rogue:8983_solr,
   base_url:http://Rogue:8983/solr;,
   leader:true}}},
 shard2:{
   range:0-7fff,
   replicas:{


 Note the addition of the replicas level to make room for other
 properties at the shard level such as range (which define what hash
 range belongs in what shard).
 Although range now exists, it is ignored by the current code (i.e.
 indexing still uses hash MOD nShards to place documents).

Correction - MOD was just one of the earliest methods, not the
previous method which split the hash range up equally between all
shards, and should still be the same when we switch to paying
attention to the ranges.

-Yonik
http://lucidworks.com