clusterstate.json will exist, it just should be empty if you're using state format 2.
Note: if you have "state.json" files under each collections in ZK (see the "tree" view in the admin UI), then you _are_ in the format 2 world. However, for Solr 5.x, there'a an obscure property "legacyCloud" that, if true will allow orphan replicas to reconstruct themselves in clusterstate.json even if the format is 2. The condition is that you have orphan replicas out there (where you've deleted the collection but for some reason were unable to delete the replica, say the Solr node hosting some replicas was down and you restarted it). When Solr starts up, this orphan reconstructs itself in clusterstate.json, where it's ignored. So you should set legacyCloud=false using the CLUSTERPROP (IIRC) collections API call. You can also just delete the _data_ from clusterstate.json. ASSUMING you're in format 2. If you're really in format 1, then see MIGRATESTATEFORMAT here: https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-MIGRATESTATEFORMAT:MigrateClusterState Best, Erick On Tue, Apr 18, 2017 at 8:03 AM, Manohar Sripada <manohar...@gmail.com> wrote: > After deleting a collection through Collection API, the data is not getting > deleted from clusterstate.json. Based on this discussion > <http://lucene.472066.n3.nabble.com/create-collection-gets-stuck-on-node-restart-td4311994.html>, > it seems clusterstate.json shouldn't be there for Solr 5.x (I am using > 5.2.1). It also mentions that stateFormat should be set to 2. > > How to set stateFormat to 2 while calling the Collection API? Can I default > it to 2 during the setup itself so that I dont need to set it up for each > and every collection creation? > > Thanks in Advance!