DAOS-6499 dtx: handle resent RPC properly#4341
Merged
jolivier23 merged 1 commit intomasterfrom Jan 27, 2021
Merged
Conversation
To handle the race from DTX refresh, the leader will pre-create the DTX entry in DRAM before dispatching related modifications. If such pre-created DTX entry was found by the resent handling logic before leader prepared related local modifications, then it should not be regarded as 'prepared' locally; instead, under such case, related RPC needs to be handled as a new RPC on the leader, and then dtx_leader_begin will find former non-prepared DTX entry (that is in processing), then reply "-DER_INPROGRESS" to the client. Signed-off-by: Fan Yong <fan.yong@intel.com>
daosbuild1
reviewed
Jan 20, 2021
Collaborator
daosbuild1
left a comment
There was a problem hiding this comment.
LGTM. No errors found by checkpatch.
jolivier23
approved these changes
Jan 20, 2021
| D_ASSERTF(0, "NOT allow to update act DTX entry for "DF_DTI | ||
| if (DAE_EPOCH(dae_old) != DAE_EPOCH(dae_new)) { | ||
| D_ASSERTF(!dae_old->dae_prepared, | ||
| "NOT allow to update act DTX entry for "DF_DTI |
Contributor
There was a problem hiding this comment.
"updating active DTX entry for DF_DTI is not allowed"
or
"Disallow update to active..."
Contributor
Author
|
daos_test -m failed for DAOS-6544. |
wangdi1
approved these changes
Jan 25, 2021
Nasf-Fan
added a commit
that referenced
this pull request
Jan 26, 2021
Contributor
Author
|
daos-test -m failed for DAOS-6544. |
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.
To handle the race from DTX refresh, the leader will pre-create
the DTX entry in DRAM before dispatching related modifications.
If such pre-created DTX entry was found by the resent handling
logic before leader prepared related local modifications, then
it should not be regarded as 'prepared' locally; instead, under
such case, related RPC needs to be handled as a new RPC on the
leader, and then dtx_leader_begin will find former non-prepared
DTX entry (that is in processing), then reply "-DER_INPROGRESS"
to the client.
Signed-off-by: Fan Yong fan.yong@intel.com