Skip to content

Commit 3abe88e

Browse files
committed
DAOS-19059 vos: cache vos object after DTX commit
It is unnecessary to evict the vos object from cache after related DTX committed; otherwise, other concurrent modification against the same object shard maybe required to retry. Signed-off-by: Fan Yong <fan.yong@hpe.com>
1 parent 52c7aa3 commit 3abe88e

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/vos/vos_dtx.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2687,6 +2687,8 @@ vos_dtx_post_handle(struct vos_container *cont,
26872687
}
26882688

26892689
for (i = 0; i < count; i++) {
2690+
struct vos_dtx_act_ent *dae = NULL;
2691+
26902692
if (daes[i] == NULL)
26912693
continue;
26922694

@@ -2703,9 +2705,12 @@ vos_dtx_post_handle(struct vos_container *cont,
27032705
}
27042706

27052707
d_iov_set(&kiov, &DAE_XID(daes[i]), sizeof(DAE_XID(daes[i])));
2706-
rc = dbtree_delete(cont->vc_dtx_active_hdl, BTR_PROBE_EQ,
2707-
&kiov, NULL);
2708+
rc = dbtree_delete(cont->vc_dtx_active_hdl, BTR_PROBE_EQ, &kiov,
2709+
abort ? NULL : &dae);
27082710
if (rc == 0 || rc == -DER_NONEXIST) {
2711+
if (dae != NULL)
2712+
D_ASSERT(dae == daes[i]);
2713+
27092714
dtx_evict_lid(cont, daes[i]);
27102715
} else {
27112716
/* The DTX entry has been committed or aborted, but we

0 commit comments

Comments
 (0)