From 1924521192c780c2c3608bbcb46a5703917dd947 Mon Sep 17 00:00:00 2001 From: BingqingLyu Date: Mon, 27 Sep 2021 15:48:47 +0800 Subject: [PATCH] [Bug Fix] fix bug in starting GAIA service in v2 and vineyard (#870) --- .../src/executor/ffi/src/executor/gaia/gaia_server.rs | 2 ++ .../src/executor/gaia_runtime/src/server/manager.rs | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/interactive_engine/src/executor/ffi/src/executor/gaia/gaia_server.rs b/interactive_engine/src/executor/ffi/src/executor/gaia/gaia_server.rs index 3eb7c4c3887d..0bc24cff6788 100644 --- a/interactive_engine/src/executor/ffi/src/executor/gaia/gaia_server.rs +++ b/interactive_engine/src/executor/ffi/src/executor/gaia/gaia_server.rs @@ -12,6 +12,7 @@ use pegasus_network::manager::SimpleServerDetector; use pegasus_network::config::NetworkConfig; use gs_gremlin::{InitializeJobCompiler, QueryMaxGraph}; use maxgraph_store::api::PartitionId; +use gremlin_core::register_gremlin_types; pub struct GaiaServer { config: Arc, @@ -41,6 +42,7 @@ impl GaiaServer { } pub fn start(&self) -> GraphResult<(u16, u16)> { + register_gremlin_types().map_err(|e| GraphError::new(EngineError, format!("{:?}", e)))?; let report = match self.config.get_storage_option("gaia.report") { None => false, Some(report_string) => report_string.parse() diff --git a/interactive_engine/src/executor/gaia_runtime/src/server/manager.rs b/interactive_engine/src/executor/gaia_runtime/src/server/manager.rs index 7278e5480fce..a0e71a6c35d3 100644 --- a/interactive_engine/src/executor/gaia_runtime/src/server/manager.rs +++ b/interactive_engine/src/executor/gaia_runtime/src/server/manager.rs @@ -37,6 +37,7 @@ use std::sync::{Arc, Mutex, RwLock}; use std::thread; use std::time; use std::vec::Vec; +use gremlin_core::register_gremlin_types; pub struct GaiaServerManager { server_manager_common: ServerManagerCommon, @@ -138,10 +139,13 @@ impl ServerManager for GaiaServerManager { } if !address_list.is_empty() && !task_partition_list.is_empty() { // start gaia_pegasus + if let Err(err) = register_gremlin_types() { + error!("register_gremlin_types failed {:?}", err); + } let configuration = build_gaia_config(worker_id as usize, address_list, store_config.clone()); info!("gaia configuration {:?}", configuration); - if let Err(err) = gaia_pegasus::startup(configuration) { - info!("start pegasus failed {:?}", err); + if let Err(err) = gaia_pegasus::startup(configuration) { + error!("start pegasus failed {:?}", err); } else { info!("start pegasus successfully"); }