From 17af23edae2f48dddb2ae2a9c40ebdb529fb8a73 Mon Sep 17 00:00:00 2001 From: xinghuayu007 <1450306854@qq.com> Date: Tue, 10 Nov 2020 10:54:29 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90Improvement=E3=80=91Avoid=20null=20hos?= =?UTF-8?q?t=20when=20forward=20to=20master=20(#4844)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: wangxixu --- .../src/main/java/org/apache/doris/qe/MasterOpExecutor.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java index a9e502950a..1c5efa6930 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java @@ -61,6 +61,9 @@ public class MasterOpExecutor { // Send request to Master private void forward() throws Exception { + if (!ctx.getCatalog().isReady()) { + throw new Exception("Node catalog is not ready, please wait for a while."); + } String masterHost = ctx.getCatalog().getMasterIp(); int masterRpcPort = ctx.getCatalog().getMasterRpcPort(); TNetworkAddress thriftAddress = new TNetworkAddress(masterHost, masterRpcPort);