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-15968 container: Fix CAPA fetch on NS master (#14511) #14545

Merged
merged 1 commit into from
Jun 11, 2024
Merged
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
14 changes: 13 additions & 1 deletion src/container/container_iv.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,15 @@ cont_iv_ent_fetch(struct ds_iv_entry *entry, struct ds_iv_key *key,
}
prop_entry = daos_prop_entry_get(prop, DAOS_PROP_CO_STATUS);
D_ASSERT(prop_entry != NULL);

daos_prop_val_2_co_status(prop_entry->dpe_val, &stat);

rc = ds_cont_tgt_open(entry->ns->iv_pool_uuid,
civ_key->cont_uuid, chdl.ch_cont,
chdl.ch_flags, chdl.ch_sec_capas,
stat.dcs_pm_ver);
if (rc != 0)
D_GOTO(out, rc);

iv_entry.iv_capa.status_pm_ver = stat.dcs_pm_ver;
daos_prop_free(prop);
/* Only happens on xstream 0 */
Expand All @@ -510,6 +517,11 @@ cont_iv_ent_fetch(struct ds_iv_entry *entry, struct ds_iv_key *key,
rc = dbtree_update(root_hdl, &key_iov, &val_iov);
if (rc == 0)
goto again;
/*
* It seems that not rolling back the ds_cont_tgt_open call
* above is harmless. Also, an error from the dbtree_update
* call should be rare.
*/
} else {
rc = -DER_NONEXIST;
}
Expand Down
Loading