Andy Vuong created SOLR-14240:
---------------------------------
Summary: 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
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: [email protected]
For additional commands, e-mail: [email protected]