Closed Tammyxia closed 2 years ago
/assign @3AceShowHand
For anyone interested in the problem, you can reproduce it by the following step
config.toml
./bin/cdc cli changefeed create --pd=http://127.0.0.1:2379 --config=~/config.toml
./bin/cdc cli changefeed create --pd=http://127.0.0.1:2379 --sink-uri="blackhole://" --config=config.toml
works
./bin/cdc cli changefeed create --pd=http://127.0.0.1:2379 --sink-uri="blackhole://" --config=~/config.toml
does not work, since ~/config.toml
is relative path, which is not automatically converted by cobra.
Normally, the ~ is expanded by the shell before your program sees it.
This should not treat as a bug, it's within the convention. Even though we can fix this manually by adding more code, I do not think this is necessary and useful. Because, =~/foo
is not supported by the shell, not the cdc program.
close by the comments above
What did you do?
There's a config file: ~/changefeedRedo.toml
Create changefeed with config: --config=\~/changefeedRedo.toml --> Failed Starting component
cdc
: /root/.tiup/components/cdc/v6.1.0/cdc cli changefeed create --pd=http://172.16.xxx:2579 --sink-uri=mysql://root:@172.16.xxx:3306 --changefeed-id=mysql-redo-1 --config=~/changefeedRedo.toml --start-ts=xxx Error: open ~/changefeedRedo.toml: no such file or directoryCreate changefeed with config: --config ~/changefeedRedo.toml -->Successful
What did you expect to see?
No response
What did you see instead?
As above
Versions of the cluster
Upstream TiDB cluster version (execute
SELECT tidb_version();
in a MySQL client):Upstream TiKV version (execute
tikv-server --version
):TiCDC version (execute
cdc version
):