Overview of the Issue
I am using ApplyRoutingRules --rules '<valid json>' to add routing rules to my Vitess cluster.
The vtctld response parses the correct number of routing rules but the fromTable and toTables reponses are empty:
Example
New RoutingRules object:
{
"rules": [
{
"from_table": "",
"to_tables": []
},
{
"from_table": "",
"to_tables": []
},
{
"from_table": "",
"to_tables": []
},
{
"from_table": "",
"to_tables": []
},
{
"from_table": "",
"to_tables": []
},
{
"from_table": "",
"to_tables": []
},
{
"from_table": "",
"to_tables": []
},
{
"from_table": "",
"to_tables": []
}
]
}
Reproduction Steps
- Consider these routing rules JSON object:
{
"rules": [
{
"fromTable": "sbtest1",
"toTables": [
"sbtest.sbtest1"
]
},
{
"fromTable": "sbtest2",
"toTables": [
"sbtest.sbtest2"
]
},
{
"fromTable": "sbtest3",
"toTables": [
"sbtest.sbtest3"
]
},
{
"fromTable": "sbtest4",
"toTables": [
"sbtest.sbtest4"
]
},
{
"fromTable": "sbtest5",
"toTables": [
"sbtest.sbtest5"
]
},
{
"fromTable": "sbtest6",
"toTables": [
"sbtest.sbtest6"
]
},
{
"fromTable": "sbtest7",
"toTables": [
"sbtest.sbtest7"
]
},
{
"fromTable": "sbtest8",
"toTables": [
"sbtest.sbtest8"
]
}
]
}
- Apply the routing rules using
vtctldclient
$ vtctldclient --server :15999 ApplyRoutingRules --rules '{
> "rules": [
> {
> "fromTable": "sbtest1",
> "toTables": [
> "sbtest.sbtest1"
> ]
> },
> {
> "fromTable": "sbtest2",
> "toTables": [
> "sbtest.sbtest2"
> ]
> },
> {
> "fromTable": "sbtest3",
> "toTables": [
> "sbtest.sbtest3"
> ]
> },
> {
> "fromTable": "sbtest4",
> "toTables": [
> "sbtest.sbtest4"
> ]
> },
> {
> "fromTable": "sbtest5",
> "toTables": [
> "sbtest.sbtest5"
> ]
> },
> {
> "fromTable": "sbtest6",
> "toTables": [
> "sbtest.sbtest6"
> ]
> },
> {
> "fromTable": "sbtest7",
> "toTables": [
> "sbtest.sbtest7"
> ]
> },
> {
> "fromTable": "sbtest8",
> "toTables": [
> "sbtest.sbtest8"
> ]
> }
> ]
> }'
- check the respone
New RoutingRules object:
{
"rules": [
{
"from_table": "",
"to_tables": []
},
{
"from_table": "",
"to_tables": []
},
{
"from_table": "",
"to_tables": []
},
{
"from_table": "",
"to_tables": []
},
{
"from_table": "",
"to_tables": []
},
{
"from_table": "",
"to_tables": []
},
{
"from_table": "",
"to_tables": []
},
{
"from_table": "",
"to_tables": []
}
]
}
If this is not what you expected, check the input data (as JSON parsing will skip unexpected fields).
Binary Version
$ vtctldclient --version
vtctldclient version Version: 18.0.5 (Git revision 4bd2e1c2f88cbff68f8b969a9ee6dad236713490 branch 'HEAD') built on Wed May 8 12:04:27 UTC 2024 by runner@fv-az1024-873 using go1.21.10 linux/amd64
Operating System and Environment details
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
$ uname -sr
Linux 5.15.0-1061-aws
### Log Fragments
_No response_
Overview of the Issue
I am using
ApplyRoutingRules --rules '<valid json>'to add routing rules to my Vitess cluster.The vtctld response parses the correct number of routing rules but the fromTable and toTables reponses are empty:
Example
Reproduction Steps
vtctldclientBinary Version
$ vtctldclient --version vtctldclient version Version: 18.0.5 (Git revision 4bd2e1c2f88cbff68f8b969a9ee6dad236713490 branch 'HEAD') built on Wed May 8 12:04:27 UTC 2024 by runner@fv-az1024-873 using go1.21.10 linux/amd64Operating System and Environment details