From 66611c1e80c6f1181b0dffa5f642853efdcd4316 Mon Sep 17 00:00:00 2001 From: Yingchun Lai Date: Wed, 29 Nov 2023 16:25:49 +0800 Subject: [PATCH 1/2] fix(admin-cli): fix the command reports incorrect ERR_INVALID_PARAMETERS error --- admin-cli/client/meta.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/admin-cli/client/meta.go b/admin-cli/client/meta.go index 0579da7626..e6d6d6735b 100644 --- a/admin-cli/client/meta.go +++ b/admin-cli/client/meta.go @@ -422,8 +422,10 @@ func (m *rpcBasedMeta) Propose(gpid *base.Gpid, action admin.ConfigType, target func (m *rpcBasedMeta) StartBackupApp(tableID int, providerType string, backupPath string) (*admin.StartBackupAppResponse, error) { req := &admin.StartBackupAppRequest{ BackupProviderType: providerType, - AppID: int32(tableID), - BackupPath: &backupPath, + AppID: int32(tableID) + } + if backupPath != "" { + req.BackupPath = &backupPath } var result *admin.StartBackupAppResponse err := m.callMeta("StartBackupApp", req, func(resp interface{}) { From 52a3dc7ccca75d4a365eb2b38c11c9e6c8c1e796 Mon Sep 17 00:00:00 2001 From: Yingchun Lai Date: Wed, 29 Nov 2023 16:29:29 +0800 Subject: [PATCH 2/2] update --- admin-cli/client/meta.go | 2 +- admin-cli/go.sum | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/admin-cli/client/meta.go b/admin-cli/client/meta.go index e6d6d6735b..e4b680f138 100644 --- a/admin-cli/client/meta.go +++ b/admin-cli/client/meta.go @@ -422,7 +422,7 @@ func (m *rpcBasedMeta) Propose(gpid *base.Gpid, action admin.ConfigType, target func (m *rpcBasedMeta) StartBackupApp(tableID int, providerType string, backupPath string) (*admin.StartBackupAppResponse, error) { req := &admin.StartBackupAppRequest{ BackupProviderType: providerType, - AppID: int32(tableID) + AppID: int32(tableID), } if backupPath != "" { req.BackupPath = &backupPath diff --git a/admin-cli/go.sum b/admin-cli/go.sum index ecfba901ef..823378be52 100644 --- a/admin-cli/go.sum +++ b/admin-cli/go.sum @@ -41,7 +41,6 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= -github.com/apache/incubator-pegasus/go-client v0.0.0-20220526071020-be5634371701 h1:J9d8jaC0rKlnf8iQuImyBiDrZnl794JlGMXX8DhMNrs= github.com/apache/incubator-pegasus/go-client v0.0.0-20220526071020-be5634371701/go.mod h1:vOnSzVwVYmatouq8qEBX+yWV4AvoCTLRpQn6JA+qojs= github.com/apache/incubator-pegasus/go-client v0.0.0-20220617101220-e49a69d25a52 h1:RvSh9D6x+zfq56hk4vXZyUwjdnpAhBO6pSqcT2nRFgY= github.com/apache/incubator-pegasus/go-client v0.0.0-20220617101220-e49a69d25a52/go.mod h1:vOnSzVwVYmatouq8qEBX+yWV4AvoCTLRpQn6JA+qojs=