This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push: new f3389973e03 [fix](heartbeat) fill default value for required field in TFrontendPingFrontendResult (#41609) (#41854) f3389973e03 is described below commit f3389973e0326165e058e6f1539cebdd51c32fb9 Author: Rayner Chen <morning...@163.com> AuthorDate: Tue Oct 15 17:33:46 2024 +0800 [fix](heartbeat) fill default value for required field in TFrontendPingFrontendResult (#41609) (#41854) 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 29e17934903..de3cc8ce8c8 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 @@ -2342,7 +2342,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: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org