This is an automated email from the ASF dual-hosted git repository.
jermy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph.git
The following commit(s) were added to refs/heads/master by this push:
new 2f11ea530 Fix start RpcServer NPE (#1921)
2f11ea530 is described below
commit 2f11ea530f3e3b3f07f20773df54635b60da8350
Author: YangJiaqi <[email protected]>
AuthorDate: Sat Jul 9 17:32:45 2022 +0800
Fix start RpcServer NPE (#1921)
---
.../src/main/java/com/baidu/hugegraph/core/GraphManager.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git
a/hugegraph-api/src/main/java/com/baidu/hugegraph/core/GraphManager.java
b/hugegraph-api/src/main/java/com/baidu/hugegraph/core/GraphManager.java
index f5e164327..83859a76e 100644
--- a/hugegraph-api/src/main/java/com/baidu/hugegraph/core/GraphManager.java
+++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/core/GraphManager.java
@@ -307,6 +307,7 @@ public final class GraphManager {
private com.alipay.remoting.rpc.RpcServer remotingRpcServer() {
ServerConfig serverConfig = Whitebox.getInternalState(this.rpcServer,
"serverConfig");
+ serverConfig.buildIfAbsent();
return Whitebox.getInternalState(serverConfig.getServer(),
"remotingServer");
}
@@ -378,6 +379,10 @@ public final class GraphManager {
}
private void waitGraphsReady() {
+ if (!this.rpcServer.enabled()) {
+ LOG.info("RpcServer is not enabled, skip wait graphs ready");
+ return;
+ }
com.alipay.remoting.rpc.RpcServer remotingRpcServer =
this.remotingRpcServer();
for (String graphName : this.graphs.keySet()) {