Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BingqingLyu committed Sep 25, 2023
1 parent 76cb7c2 commit f2f9482
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions interactive_engine/executor/ir/runtime/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use std::sync::Arc;
use graph_proxy::apis::cluster_info::ClusterInfo;
use graph_proxy::apis::partitioner::{PartitionInfo, PartitionKeyId};
use graph_proxy::GraphProxyResult;
use pegasus::server_id;

pub type WorkerId = u64;

Expand Down Expand Up @@ -57,11 +58,10 @@ impl<P: PartitionInfo, C: ClusterInfo> Router for DefaultRouter<P, C> {
type C = C;
fn route(&self, data: PartitionKeyId) -> GraphProxyResult<WorkerId> {
let partition_id = self.partition_info.get_partition_id(&data)?;
debug!("route partition id: {:?}", partition_id);
let server_id = self
.partition_info
.get_server_id(partition_id)?;
debug!("route server id: {:?}", partition_id);
trace!("route partition id {:?}, server id: {:?}", partition_id, server_id);
let servers_num = self.cluster_info.get_server_num()?;
let magic_num = (data as u32) / servers_num;
let workers_num = self.cluster_info.get_local_worker_num()?;
Expand Down

0 comments on commit f2f9482

Please sign in to comment.