[ 
https://issues.apache.org/jira/browse/SOLR-3815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454608#comment-13454608
 ] 

Yonik Seeley edited comment on SOLR-3815 at 9/13/12 2:49 PM:
-------------------------------------------------------------

Folks, while working to add the "replicas" level to shards (to make room for 
other properties), I noticed that the Overseer.updateSlice() method changed the 
existing ClusterState (which is advertised as being immutable).  I re-wrote the 
method to be much shorter, and immutable with respect to the existing 
ClusterState, and started getting a test failure.

I eventually tried just adding back the part of the code that erroneously 
modified the existing ClusterState, and the test passed again (see the nocommit 
block in Overseer).

Any idea what's going on?

edit: the test that failed was LeaderElectionIntegrationTest.  Not sure if it 
caused other failures.

edit: in Overseer.run() we have "ClusterState clusterState = 
reader.getClusterState();" and that is the state that is accidentally being 
modified (that accidentally makes things work).  I assume the reader is 
supposed to update it's state via zookeeper - which means there is perhaps 
something wrong with reader.updateClusterState(true)?
                
      was (Author: [email protected]):
    Folks, while working to add the "replicas" level to shards (to make room 
for other properties), I noticed that the Overseer.updateSlice() method changed 
the existing ClusterState (which is advertised as being immutable).  I re-wrote 
the method to be much shorter, and immutable with respect to the existing 
ClusterState, and started getting a test failure.

I eventually tried just adding back the part of the code that erroneously 
modified the existing ClusterState, and the test passed again (see the nocommit 
block in Overseer).

Any idea what's going on?

edit: the test that failed was LeaderElectionIntegrationTest.  Not sure if it 
caused other failures.

edit: in Overseer.run() we have "ClusterState clusterState = 
reader.getClusterState();" and that is the state that is accidentally being 
modified (that accidentally makes things work).  I assume this is OK, as the 
reader is supposed to update it's state via zookeeper - which means there is 
perhaps something wrong with reader.updateClusterState(true)?
                  
> add hash range to shard
> -----------------------
>
>                 Key: SOLR-3815
>                 URL: https://issues.apache.org/jira/browse/SOLR-3815
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Yonik Seeley
>         Attachments: SOLR-3815_addrange.patch, 
> SOLR-3815_clusterState_immutable.patch, SOLR-3815.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to