This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 33c040c50b3 [fix](heartbeat) fill default value for required field in
TFrontendPingFrontendResult (#41609) (#41853)
33c040c50b3 is described below
commit 33c040c50b395395157d4f3441bc2b055af1a5e5
Author: Rayner Chen <[email protected]>
AuthorDate: Tue Oct 15 18:12:30 2024 +0800
[fix](heartbeat) fill default value for required field in
TFrontendPingFrontendResult (#41609) (#41853)
bp #41609
---
.../main/java/org/apache/doris/service/FrontendServiceImpl.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
index 4f4d29680aa..8e7e2b49952 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
@@ -2232,7 +2232,14 @@ public class FrontendServiceImpl implements
FrontendService.Iface {
public TFrontendPingFrontendResult ping(TFrontendPingFrontendRequest
request) throws TException {
boolean isReady = Env.getCurrentEnv().isReady();
TFrontendPingFrontendResult result = new TFrontendPingFrontendResult();
+ // The following fields are required in thrift.
+ // So must give them a default value to avoid "Required field xx was
not present" error.
result.setStatus(TFrontendPingFrontendStatusCode.OK);
+ result.setMsg("");
+ result.setQueryPort(0);
+ result.setRpcPort(0);
+ result.setReplayedJournalId(0);
+ result.setVersion(Version.DORIS_BUILD_VERSION + "-" +
Version.DORIS_BUILD_SHORT_HASH);
if (isReady) {
if (request.getClusterId() != Env.getCurrentEnv().getClusterId()) {
result.setStatus(TFrontendPingFrontendStatusCode.FAILED);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]