Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-14105 object: collectively punch object #13493

Merged
merged 1 commit into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
25 changes: 16 additions & 9 deletions src/container/srv_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -1653,6 +1653,8 @@ ds_cont_tgt_open(uuid_t pool_uuid, uuid_t cont_hdl_uuid,
struct dss_coll_ops coll_ops = { 0 };
struct dss_coll_args coll_args = { 0 };
struct ds_pool *pool;
int *exclude_tgts = NULL;
uint32_t exclude_tgt_nr = 0;
int rc;

/* Only for debugging purpose to compare srv_cont_hdl with cont_hdl_uuid */
Expand Down Expand Up @@ -1685,18 +1687,22 @@ ds_cont_tgt_open(uuid_t pool_uuid, uuid_t cont_hdl_uuid,
coll_args.ca_func_args = &arg;

/* setting aggregator args */
rc = ds_pool_get_failed_tgt_idx(pool_uuid, &coll_args.ca_exclude_tgts,
&coll_args.ca_exclude_tgts_cnt);
if (rc) {
rc = ds_pool_get_failed_tgt_idx(pool_uuid, &exclude_tgts, &exclude_tgt_nr);
if (rc != 0) {
D_ERROR(DF_UUID "failed to get index : rc "DF_RC"\n",
DP_UUID(pool_uuid), DP_RC(rc));
return rc;
goto out;
}

rc = dss_thread_collective_reduce(&coll_ops, &coll_args, 0);
D_FREE(coll_args.ca_exclude_tgts);
if (exclude_tgts != NULL) {
rc = dss_build_coll_bitmap(exclude_tgts, exclude_tgt_nr, &coll_args.ca_tgt_bitmap,
&coll_args.ca_tgt_bitmap_sz);
if (rc != 0)
goto out;
}

if (rc != 0) {
rc = dss_thread_collective_reduce(&coll_ops, &coll_args, 0);
if (rc != 0)
/* Once it exclude the target from the pool, since the target
* might still in the cart group, so IV cont open might still
* come to this target, especially if cont open/close will be
Expand All @@ -1706,9 +1712,10 @@ ds_cont_tgt_open(uuid_t pool_uuid, uuid_t cont_hdl_uuid,
D_ERROR("open "DF_UUID"/"DF_UUID"/"DF_UUID":"DF_RC"\n",
DP_UUID(pool_uuid), DP_UUID(cont_uuid),
DP_UUID(cont_hdl_uuid), DP_RC(rc));
return rc;
}

out:
D_FREE(coll_args.ca_tgt_bitmap);
D_FREE(exclude_tgts);
return rc;
}

Expand Down
3 changes: 2 additions & 1 deletion src/dtx/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def scons():
# dtx
denv.Append(CPPDEFINES=['-DDAOS_PMEM_BUILD'])
dtx = denv.d_library('dtx',
['dtx_srv.c', 'dtx_rpc.c', 'dtx_resync.c', 'dtx_common.c', 'dtx_cos.c'],
['dtx_srv.c', 'dtx_rpc.c', 'dtx_resync.c', 'dtx_common.c', 'dtx_cos.c',
'dtx_coll.c'],
install_off="../..")
denv.Install('$PREFIX/lib64/daos_srv', dtx)

Expand Down
Loading
Loading