This is an automated email from the ASF dual-hosted git repository.
dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new adb636682 [INLONG-5281][TubeMQ] Reconnect to tubemq server if
StandbyException is thrown (#5288)
adb636682 is described below
commit adb63668273e47ab9cafbdffe87680c249ca5446
Author: Zijie Lu <[email protected]>
AuthorDate: Sun Jul 31 11:13:00 2022 +0800
[INLONG-5281][TubeMQ] Reconnect to tubemq server if StandbyException is
thrown (#5288)
---
.../tubemq-client-twins/tubemq-client-go/client/heartbeat.go | 4 ++--
inlong-tubemq/tubemq-client-twins/tubemq-client-go/rpc/client.go | 3 ---
inlong-tubemq/tubemq-client-twins/tubemq-client-go/util/util.go | 2 +-
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git
a/inlong-tubemq/tubemq-client-twins/tubemq-client-go/client/heartbeat.go
b/inlong-tubemq/tubemq-client-twins/tubemq-client-go/client/heartbeat.go
index ee738c9c4..094222087 100644
--- a/inlong-tubemq/tubemq-client-twins/tubemq-client-go/client/heartbeat.go
+++ b/inlong-tubemq/tubemq-client-twins/tubemq-client-go/client/heartbeat.go
@@ -129,9 +129,9 @@ func (h *heartbeatManager) consumerHB2Master() {
return
}
}
+ h.consumer.masterHBRetry = 0
+ h.processHBResponseM2C(rsp)
}
- h.consumer.masterHBRetry = 0
- h.processHBResponseM2C(rsp)
h.resetMasterHeartbeat()
}
diff --git a/inlong-tubemq/tubemq-client-twins/tubemq-client-go/rpc/client.go
b/inlong-tubemq/tubemq-client-twins/tubemq-client-go/rpc/client.go
index 88ef9eb61..1e2c4df6f 100644
--- a/inlong-tubemq/tubemq-client-twins/tubemq-client-go/rpc/client.go
+++ b/inlong-tubemq/tubemq-client-twins/tubemq-client-go/rpc/client.go
@@ -99,8 +99,5 @@ func (c *rpcClient) doRequest(ctx context.Context, address
string,
}
v := rsp.(*codec.TubeMQRPCResponse)
- if v.ResponseException != nil {
- return nil, errs.New(errs.RetResponseException,
v.ResponseException.String())
- }
return v.ResponseBody, nil
}
diff --git a/inlong-tubemq/tubemq-client-twins/tubemq-client-go/util/util.go
b/inlong-tubemq/tubemq-client-twins/tubemq-client-go/util/util.go
index 3f343802d..a5e47a94e 100644
--- a/inlong-tubemq/tubemq-client-twins/tubemq-client-go/util/util.go
+++ b/inlong-tubemq/tubemq-client-twins/tubemq-client-go/util/util.go
@@ -120,7 +120,7 @@ func SplitToMap(source string, step1 string, step2 string)
map[string]string {
func IsValidString(s string) (bool, error) {
if matched, _ := regexp.Match("^[a-zA-Z]\\w+$", []byte(s)); !matched {
return false,
- errors.New(fmt.Sprintf("illegal parameter: %s must
begin with a letter, " +
+ errors.New(fmt.Sprintf("illegal parameter: %s must
begin with a letter, "+
"can only contain characters,numbers,and
underscores", s))
}
return true, nil