Skip to content

Commit

Permalink
DAOS-15499 dtx: cleanup DTX for failure (#14224)
Browse files Browse the repository at this point in the history
That will drop partial modification, remove the pinned DTX entry,
evict related stale cache.

Signed-off-by: Fan Yong <[email protected]>
  • Loading branch information
Nasf-Fan authored Apr 24, 2024
1 parent b62edc8 commit ddaf6ce
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/dtx/dtx_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1463,8 +1463,7 @@ dtx_leader_end(struct dtx_leader_handle *dlh, struct ds_cont_hdl *coh, int resul

if (!daos_is_zero_dti(&dth->dth_xid)) {
/* Drop partial modification and remove the pinned DTX entry. */
if (result < 0 && result != -DER_AGAIN && !aborted && !dth->dth_solo &&
dth->dth_modification_cnt > 0)
if (result < 0 && !aborted && dth->dth_modification_cnt > 0)
vos_dtx_cleanup(dth, true);

/* For solo DTX, just let client retry for DER_AGAIN case. */
Expand Down

0 comments on commit ddaf6ce

Please sign in to comment.