Changing dgraph node names

Hi, I’m having an issue while changing configuration for a DGraph database. I have a DGraph v21.03.2 database running with 6 alpha nodes and a zero node that I deploy with docker compose and persistent storage.

I want to change the names of the nodes from “alpha1” to “alpha1-1” etc.
However, if I change the names of the nodes, and redeploy the database, the alpha nodes will still try to connect to the old node names, instead of the new ones. I can fix this issue by deleting all directories DGraph uses, but that will also delete all data.

Is there a specific file in which this peer name configuration is saved, so that I can delete just those files and don’t have to delete all data just to rename the node names?

This happens because all nodes send their respective addresses provided in “my” flag to the leader. There is no way to rename this right now. The only way is to remove the node and promote another one.

You can first add the new node with the new names to the group. And then go removing the old ones as soon as the new nodes already have enough data.