Skip to content

Commit 7da3688

Browse files
committed
DAOS-17591 object: refresh DTX MBS for case being changed
During DTX preparing, if some related target is evicted for some reason, then the in processing DTX maybe failed and related client will resend the RPC with new DTX MBS (participants) information based on new pool map. On the other hand, the DTX on other healthy targets may has been prepared with old MBS information. Under such case, related RPC handler on server needs to process the resent RPC and refresh related DTX's MBS information (and the pool map version, flags if DTX leader is switched). Then the subsequent DTX RPC (such as commit, abort, check and refresh) can be sent to the right targets/participants. Signed-off-by: Fan Yong <[email protected]>
1 parent e076a6a commit 7da3688

File tree

3 files changed

+269
-197
lines changed

3 files changed

+269
-197
lines changed

src/include/daos_srv/vos.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,23 @@ int
163163
vos_dtx_load_mbs(daos_handle_t coh, struct dtx_id *dti, daos_unit_oid_t *oid,
164164
struct dtx_memberships **mbs);
165165

166+
/**
167+
* Refresh participants information and pool map version for the given DTX.
168+
*
169+
* \param coh [IN] Container open handle.
170+
* \param dti [IN] Pointer to the DTX identifier.
171+
* \param mbs [IN] Pointer to the DTX participants information.
172+
* \param pm_ver [IN] Pool map version for the new DTX participants information.
173+
* \param leader [IN] Is DTX leader or not.
174+
*
175+
* \return Zero on success.
176+
* Positive if changed nothing.
177+
* Negative value if error.
178+
*/
179+
int
180+
vos_dtx_refresh_mbs(daos_handle_t coh, struct dtx_id *dti, struct dtx_memberships *mbs,
181+
uint32_t pm_ver, bool leader);
182+
166183
/**
167184
* Commit the specified DTXs.
168185
*

0 commit comments

Comments
 (0)