Repository navigation
Conversation
|
Ticket title is 'Race between DTX abort and DTX resync breaks DTX semantics' |
1. In theory, it is possible that when exclude some engine, related ULT maybe trying to abort a DTX because of some failure happened during local modification (but related modification has succeeded on remote targets). Related DTX_ABORT RPC has been sent out but not been received or processed by related remote targets. Under such case, the DTX leader is switched because of related engine is excluded. And then DTX resync is triggered by new DTX leader who may regard such DTX as committable since all alive targets claim 'PREPARED'. Then the new DTX leader will make different decision that conflict with old DTX leader did. That may cause related DTX to be aborted on some targets but committed on the others, as to data inconsistency among related redundancy group. The new logic forbids to abort DTX from old DTX leader to avoid such inconsistency. 2. Set dae->dae_aborting before vos_dtx_abort_internal() to prevent potential race with other DTX commit/abort/cleanup operations. 3. Set dth->dth_need_validation before vos_dtx_abort_internal() to avoid IO handle missing the race check for DTX abort. 4. Only trigger DTX refresh for PREPARED DTX, as for others, such as the DTX entry in INITED or PREPARING status, directly return -DER_INPROGRESS when need to retry related operation. 5. Locally check DTX status before triggering DTX CHECK remotely to handle potential race with IO handler for resent RPC. 6. During DTX resync, the DTX CHECK RPC should not be sent to the target which UP status and co_in_ver is newer than related DTX version. Because related DTX is either non-exist or removed on the target being reintegrated. 7. Convert dtx_leader_begin() returned failure -DER_TX_RESTART as -DER_INPROGRESS to help client to properly handle related RPC. 8. New test cases for DTX abort with fense. 9. Code cleanup. Signed-off-by: Fan Yong <[email protected]> Signed-off-by: Liang Zhen <[email protected]>
Nasf-Fan
force-pushed
the
Nasf-Fan/DAOS-19812_b28
branch
from
October 25, 2026 05:08
41f9807 to
2a6e3cb
Compare
Collaborator
|
Test stage Functional Hardware Medium Verbs Provider MD on SSD completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-19364/1/execution/node/1685/log |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In theory, it is possible that when exclude some engine, related ULT maybe trying to abort a DTX because of some failure happened during local modification (but related modification has succeeded on remote targets). Related DTX_ABORT RPC has been sent out but not been received or processed by related remote targets. Under such case, the DTX leader is switched because of related engine is excluded. And then DTX resync is triggered by new DTX leader who may regard such DTX as committable since all alive targets claim 'PREPARED'. Then the new DTX leader will make different decision that conflict with old DTX leader did. That may cause related DTX to be aborted on some targets but committed on the others, as to data inconsistency among related redundancy group. The new logic forbids to abort DTX from old DTX leader to avoid such inconsistency.
Set dae->dae_aborting before vos_dtx_abort_internal() to prevent potential race with other DTX commit/abort/cleanup operations.
Set dth->dth_need_validation before vos_dtx_abort_internal() to avoid IO handle missing the race check for DTX abort.
Only trigger DTX refresh for PREPARED DTX, as for others, such as the DTX entry in INITED or PREPARING status, directly return -DER_INPROGRESS when need to retry related operation.
Locally check DTX status before triggering DTX CHECK remotely to handle potential race with IO handler for resent RPC.
During DTX resync, the DTX CHECK RPC should not be sent to the target which UP status and co_in_ver is newer than related DTX version. Because related DTX is either non-exist or removed on the target being reintegrated.
Convert dtx_leader_begin() returned failure -DER_TX_RESTART as -DER_INPROGRESS to help client to properly handle related RPC.
New test cases for DTX abort with fense.
Code cleanup.
Steps for the author:
After all prior steps are complete: