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

ASF subversion and git services commented on SOLR-14240:
--------------------------------------------------------

Commit 8d1601156745853c5f89f056f10d71d7bad29722 in solr's branch 
refs/heads/delete-zk-nodes from Pierre Salagnac
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=8d160115674 ]

SOLR-14240: Clean up ZK nodes after shard deletion is invoked


> Shard deletion doesn't clean up parent znodes in zookeeper
> ----------------------------------------------------------
>
>                 Key: SOLR-14240
>                 URL: https://issues.apache.org/jira/browse/SOLR-14240
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>            Reporter: Andy Vuong
>            Priority: Minor
>         Attachments: withDelete.png, withoutDelete.png
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Shard deletion doesn’t seem to completely clean up the zookeeper tree and 
> leaves parent nodes of deleted children. Shard deletion doesn’t seem to 
> completely clean up the zookeeper tree and leaves parent nodes of deleted 
> children. The following paths will have left over znodes for the shard after 
> deletion:
> /collections/collectionName/leader_elect/<shard>
>  /collections/collectionName/leaders/<shard>
>  /collections/collectionName/terms/<shard>
> To repro:
>  # Create a collection with 2 shards
>  # Split one of the shards 
> ([http://localhost:8983/solr/admin/collections?action=SPLITSHARD&collection=test&shard=shard1])
>  # Delete the now inactive parent shard 
> ([http://localhost:8983/solr/admin/collections?action=DELETESHARD&collection=test&shard=shard1])
>  # Check [http://localhost:8983/solr/#/~cloud?view=tree] and verify that the 
> znode path is only partially cleaned up and the parent znodes remain for the 
> above paths
>  # The UI populates the tree view via the paths such as the following which 
> retrieves the details for a specific path 
> [http://localhost:8983/solr/admin/zookeeper?detail=true&path=/collections/test/terms/shard1].
>  Tracing the code path shows this path is handled by ZookeeperInfoHandler 
> which reads ZK directly which means the data definitely sits on zookeeper 
> until the collection is deleted
> Looking briefly at the existing logic, the terms node is actually never 
> deleted by DELETESHARD, only terms are removed from it. /leaders/<shardId> 
> and /leader_elect/<shardId> have their children deleted but not the actual 
> shardId node. These are only cleaned up nicely when the collection itself is 
> deleted. For a large collection with many splits we leave many artifacts 
> behind after the inactive shards get cleaned up.
> Current state
> !withoutDelete.png|width=124,height=259!
> With deleting the left over
> !withDelete.png|width=130,height=271!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to