You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Andy Vuong (Jira)" <ji...@apache.org> on 2020/02/04 19:01:00 UTC

[jira] [Updated] (SOLR-14240) Shard deletion doesn't clean up parent znodes in zookeeper

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

Andy Vuong updated SOLR-14240:
------------------------------
    Attachment: withoutDelete.png
                withDelete.png

> 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
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrCloud
>            Reporter: Andy Vuong
>            Priority: Minor
>         Attachments: withDelete.png, withoutDelete.png
>
>          Time Spent: 10m
>  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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org