On 4/11/2019 3:17 AM, Koen De Groote wrote:
The basic steps are: set up zookeeper, set up solr root, set up solr. Create dummy collection with example data. Stop the containers. Delete the zookeeper 'version-2' folder. Recreate zookeeper container. Redo the mkroot, recreate solr container. At this point, solr will start complaining about the cores after a bit and then the data folders will be deleted.
By deleting the "version-2" folder, you deleted the entire ZooKeeper database. All of the information that makes up your entire SolrCloud cluster is *gone*.
We are trying as hard as we can to move to a "ZooKeeper As Truth" model. Right now, the truth of a SolrCloud cluster is a combination of what's in ZooKeeper and what actually exists on disk, rather than just what's in ZK.
It surprises me greatly that Solr is deleting data. I would expect it to simply ignore cores during startup if there is no corresponding data in ZooKeeper. In the past, I have seen evidence of it doing exactly that.
So although it sounds like we do have a bug that needs fixing (SolrCloud should never delete data unless it has been explicitly asked to do so), you created this problem yourself by deleting all of your ZooKeeper data -- in essence, deleting the entire cluster.
Thanks, Shawn