Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions src/cart/crt_group.c
Original file line number Diff line number Diff line change
Expand Up @@ -1471,14 +1471,12 @@ crt_primary_grp_init(crt_group_id_t grpid)
{
struct crt_grp_gdata *grp_gdata;
struct crt_grp_priv *grp_priv = NULL;
crt_group_id_t pri_grpid;
bool is_service;
crt_group_id_t pri_grpid;
int rc = 0;

grp_gdata = crt_gdata.cg_grp;
D_ASSERT(grp_gdata != NULL);

is_service = crt_is_service();
pri_grpid = (grpid != NULL) ? grpid : CRT_DEFAULT_GRPID;

rc = crt_grp_priv_create(&grp_priv, pri_grpid, true);
Expand All @@ -1488,13 +1486,8 @@ crt_primary_grp_init(crt_group_id_t grpid)
}
D_ASSERT(grp_priv != NULL);

if (is_service) {
grp_priv->gp_self = CRT_NO_RANK;
grp_priv->gp_size = 0;
} else {
grp_priv->gp_size = 1;
grp_priv->gp_self = 0;
}
grp_priv->gp_self = CRT_NO_RANK;
grp_priv->gp_size = 0;

rc = grp_priv_init_membs(grp_priv, grp_priv->gp_size);
if (rc != 0) {
Expand Down
4 changes: 4 additions & 0 deletions src/cart/crt_rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,10 @@ crt_req_is_self(struct crt_rpc_priv *rpc_priv)
bool same_rank;

D_ASSERT(rpc_priv != NULL);

if (!crt_is_service())
return false;

grp_priv_self = crt_grp_pub2priv(NULL);
tgt_ep = &rpc_priv->crp_pub.cr_ep;
same_group = (tgt_ep->ep_grp == NULL) ||
Expand Down
Loading