Skip to content

Commit

Permalink
[Bug Fix] fix bug in starting GAIA service in v2 and vineyard (#870)
Browse files Browse the repository at this point in the history
  • Loading branch information
BingqingLyu committed Sep 27, 2021
1 parent f47e019 commit 1924521
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<GraphConfig>,
Expand Down Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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");
}
Expand Down

0 comments on commit 1924521

Please sign in to comment.