[ 
https://issues.apache.org/jira/browse/SOLR-4693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shalin Shekhar Mangar updated SOLR-4693:
----------------------------------------

    Attachment: SOLR-4693.patch

* I changed Overseer action and methods to deleteShard instead of deleteSlice, 
sliceCmd to shardCmd and DeleteSliceTest to DeleteShardTest (and related 
changes inside the test as well). I know it is confusing but we already have 
createshard and updateshardstate in Overseer and I didn't want to add more 
inconsistency.
* In CollectionHandler.handleDeleteShardAction, I removed the name == null 
check because we used params.required().get which ensures that name can never 
be null. The createcollection api also makes the same mistake :)
* The Overseer.deleteSlice/deleteShard was not atomic so I changed the 
following:
{code}
Map<String, Slice> newSlices = coll.getSlicesMap();
{code}
to
{code}
Map<String, Slice> newSlices = new LinkedHashMap<String, 
Slice>(coll.getSlicesMap());
{code}
* Added a wait loop to OCP.deleteShard like the one in delete collection
* Fixed shardCount and sliceCount in DeleteShardTest constructor
* Added a break to the wait loop inside DeleteShardTest.setSliceAsInactive and 
added a force update cluster state. Also an exception in if (!transition) is 
created but never thrown.
* Removed redundant assert in DeleteShardTest.doTest because it can never be 
triggerred (because an exception is thrown from the wait loop in 
setSliceAsInactive)
{code}
assertEquals("Shard1 is not inactive yet.", Slice.INACTIVE, slice1.getState());
{code}
* Added a connection and read timeout to HttpSolrServer created in 
DeleteShardTest.deleteShard
* I also took this opportunity to remove the timeout hack I had added to 
CollectionHandler for splitshard and had forgotten to remove it
* Moved zkStateReader.updateClusterState(true) inside the wait loop of 
DeleteShardTest.confirmShardDeletion
* Removed extra assert in DeleteShardTest.confirmShardDeletion for shard2 to be 
not null.

I'll commit this tomorrow if there are no objections.
                
> Create a collections API to delete/cleanup a Slice
> --------------------------------------------------
>
>                 Key: SOLR-4693
>                 URL: https://issues.apache.org/jira/browse/SOLR-4693
>             Project: Solr
>          Issue Type: Improvement
>          Components: SolrCloud
>            Reporter: Anshum Gupta
>            Assignee: Shalin Shekhar Mangar
>         Attachments: SOLR-4693.patch, SOLR-4693.patch, SOLR-4693.patch, 
> SOLR-4693.patch
>
>
> Have a collections API that cleans up a given shard.
> Among other places, this would be useful post the shard split call to manage 
> the parent/original slice.

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