wesql / wescale

WeScale is a Modern MySQL proxy that supports read-write-split, read-after-write-consistency, load balancing and OnlineDDL.
https://wesql.io
Apache License 2.0
211 stars 8 forks source link

[Enhancement Request] Misleading error message for 'Branch Prepare' command when source database does not exists #534

Closed earayu closed 1 month ago

earayu commented 1 month ago

Background

When executing the 'Branch Prepare' command in the provided scenario, an error message indicating that the source database node does not exist is displayed. This error message can be misleading and does not provide clear guidance on the root cause of the issue.

/vt # vtctlclient --server localhost:15999 Branch -- \
>   --source_database branch_source111 \
>   --target_database branch_target111 \
>   --workflow_name branch_test \
>   --skip_copy_phase=false \
>   --stop_after_copy=false \
>   --default_filter_rules "RAND()<0.1" \
> Prepare
Branch Error: rpc error: code = Unknown desc = node doesn't exist: /vitess/global/keyspaces/branch_source111/VSchema
E0926 12:46:16.709781     141 main.go:105] remote error: rpc error: code = Unknown desc = node doesn't exist: /vitess/global/keyspaces/branch_source111/VSchema

Proposal

Enhance the error message for the 'Branch Prepare' command.

earayu commented 1 month ago

Simple "source database does not exist" is just fine.

newborn22 commented 1 month ago

fixed