Skip to content

Commit

Permalink
Supply dth_op_seq
Browse files Browse the repository at this point in the history
Signed-off-by: Li Wei <[email protected]>
Required-githooks: true
  • Loading branch information
liw committed Jan 30, 2024
1 parent 3545dbb commit 3fadd03
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/rdb/rdb_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,14 @@ rdb_vos_tx_end(struct rdb *db, rdb_vos_tx_t vtx, int err)
return rc;
}

static inline void
rdb_vos_tx_inc_op_seq(rdb_vos_tx_t vtx)
{
struct dtx_handle *dth = vtx;

dth->dth_op_seq++;
}

enum rdb_vos_op {
RDB_VOS_QUERY,
RDB_VOS_UPDATE
Expand Down Expand Up @@ -583,6 +591,7 @@ rdb_vos_update(daos_handle_t cont, daos_epoch_t epoch, rdb_oid_t oid, bool crit,
rdb_oid_to_uoid(oid, &uoid);
rdb_vos_set_iods(RDB_VOS_UPDATE, n, akeys, values, iods);
rdb_vos_set_sgls(RDB_VOS_UPDATE, n, values, sgls);
rdb_vos_tx_inc_op_seq(vtx);
return vos_obj_update_ex(cont, uoid, epoch, RDB_PM_VER, vos_flags, &rdb_dkey, n, iods,
NULL /* iods_csums */, sgls, vtx);
}
Expand All @@ -594,6 +603,7 @@ rdb_vos_punch(daos_handle_t cont, daos_epoch_t epoch, rdb_oid_t oid, int n, d_io
daos_unit_oid_t uoid;

rdb_oid_to_uoid(oid, &uoid);
rdb_vos_tx_inc_op_seq(vtx);
return vos_obj_punch(cont, uoid, epoch, RDB_PM_VER, 0, n == 0 ? NULL : &rdb_dkey, n,
n == 0 ? NULL : akeys, vtx);
}
Expand Down

0 comments on commit 3fadd03

Please sign in to comment.