-
Notifications
You must be signed in to change notification settings - Fork 760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Databend Meta Log Data Overwrites Config Values #17296
Comments
This appears to be a regression of some kind since this used to work correctly in the past. |
Yes, this is a designed feature. The raft advertisement address is stored in the raft log and cannot be changed unless you execute a membership change command. Therefore, regardless of what the raft address is in the config file, it will be ignored after the cluster is initialized. If you want to change the raft address, you will need to remove the node and add a new one with the updated address. However, this behavior is different for the gRPC address, which is updated every time the corresponding node is restarted. If there is an issue with your scenario, could you clarify which field in the config file is being ignored or replaced? |
the advertisement address is strictly prohibited from any change from the very first day. The address must not be changed under any circumstances. Any alteration to the address can trigger a brain - split issue. In contrast, the GRPC address can be modified during system restart. This ability to change the GRPC address during restart was added as a feature about a year ago. |
@drmingdrmer What would happen if you needed to migrate your databend meta cluster to another datacenter? For disaster recovery or changing hosting providers. You would need to set all of the IP addresses in the new architecture be the same as they were in the original? |
This is especially problematic on Kubernetes, because we have the ability to move things across namespaces quite easily, which changes addresses, and in general practice we can never guarantee we will hold the same IP address for long. |
The V003 convention seems to behave in the way I would expect, where the raft log only retained the entry for the node by index, and mapped the value when the log was replayed:
|
Storing any connection data via IP is going to break Kubernetes implementations for sure. Is it possible that we could get a |
The standard process is to backup data from the running databend-meta cluster with:
and then restore the a new cluster in another DC with updated peer addresses specified:
|
You do not need to hold the same IP. but the host name for |
There is no behavior change in any version. What is the unexpected behavior you have encountered? |
What do you mean by “log by IP”? What kind of information are you trying to obtain using the IP address? |
This does not work when importing into a new environment. The address specified for --initial-cluster will be replaced with what came from the backup being imported. |
Here is an example of a backup and restore with different addresses:
^ When running ./databend-metactl status right after the import finishes.
|
You can see the voting addresses are different from the member addresses of the current cluster. |
The entirety of the
Specifically in the backup being restored, you can see the endpoints are included in the backup set:
My proposal is that a backup should not have any concern for the hostnames of the source cluster. For example, a Redis AOF can be replayed on any new cluster. |
@drmingdrmer I should probably rephrase: This issue should read: Databend Meta Backups Use The Source Cluster Hostnames Instead Of The Destination. What I'd like to see exactly: Databend backups only include the name of the node in each line, which would enable a backup to be transferred from any source cluster, to any destination. |
That is impossible. The hostname is part of the raft log. Removing portion of raft log just results in data inconsistency. The raft-advertise-address should be updated with There should be several lines of raft-log that adds new cluster configuration to override the existing ones, such as:
And make sure the config file you were using to start the databend-meta contains the correct new cluster addresses. |
Search before asking
Version
Using Kubernetes with Docker image: datafuselabs/databend-meta:v1.2.680-p3
What's Wrong?
When databend meta starts, it ignores config values and loads them from logs instead.
Here is startup log for a node. Most important you can see that we want these nodes to join the
clone3
namespace.But, what happens if you check databendmetactl --status
You see it took the connection string from the logs and replaced all the connection info. Which break all nodes.
How to Reproduce?
Take a databend meta backup from one cluster/namespace, or one set of server.
Restore that backup to another cluster/namespace or other server.
Are you willing to submit PR?
The text was updated successfully, but these errors were encountered: