Add leaf failed after delete leaf

Hello everyone:

     when i deleted some  "data/logs" files My memsql can't start .And i try to deleted leaf .
    But when i use "add leaf root:'xx'@'172.51.179.20':3307" it now work.

[Err] 1007 - The node 172.51.179.20:3307 already has a cluster database and is already member of a cluster, or has a vestigial cluster database. Delete the data directory on the aggregator before joining it to a cluster

I don’t have an answer for your question about how to deal with that error. I’m guessing you were trying to move your data directory to a new folder, is that right? This post has instructions about how to do that.

Worst case, if you have a backup, you can rebuild your cluster, with your datadir in the desired place, and restore from the backup,

when i deleted some “data/logs” files My memsql can’t start

It appears you may have deleted some of your data. You never want to delete data from the /data directory because that is where your data is held.

It is important to focus on which node these were deleted from (Leaf/Agg/Master Agg) as this is not clarified. Where were these logs deleted from? Which logs were deleted?

If you deleted the files located at “data/logs” on a leaf node then you have deleted some of the transaction logs that SingleStore uses to rebuild the database (and therefore the data involved) during leaf startup and recovery.

If high availability is not enabled then you will need to restore the data from a backup if you have one otherwise, the data is likely lost.

It’s also possible that the complete removal of the leaf failed and that error could correspond to this or some other possible issues within the cluster. So we can check this and the presence of HA can you run SHOW LEAVES; from a database prompt and take a look at the output (share it here also)?

Check to see if that leaf is still there. It may have not been removed completely and if so you’ll want to check if you have HA enabled, then the paired leaf should replicate the deleted data back to that leaf.

If you see two availability groups (1 and 2) then you have HA, but if not then you do not currently have HA enabled and may have deleted a portion of your data. In this case, it would be best to rebuild and restore from a backup.