Skip to content

DAOS-19616 dtx: fix race issues between DTX resync and rebuild - #19238

Closed
Nasf-Fan wants to merge 1 commit into
masterfrom
Nasf-Fan/DAOS-19616
Closed

Nasf-Fan wants to merge 1 commit into
masterfrom
Nasf-Fan/DAOS-19616

Conversation

@Nasf-Fan

Copy link
Copy Markdown
Contributor
  1. On each target, before scanning the container shard for rebuild, the logic will wait its global stable epoch (per container based) to exceed rebuild epoch. It will guarantee that all the inflight IO result that are triggered before rebuild start is visible to the subsequent rebuild logic whether on DTX leader or not.

  2. Before handling some modification on DTX leader, need to check whether the epoch for current modification is newer than pool's rebuild epoch or not. If not, then return -DER_UPDATE_AGAIN to the client that will retry the modification sometime later.

  3. 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 exlcuded. 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.

  4. If the modification is in rebuilding/reintegrating, then related modification will use synchronous DTX to refresh related global stable epoch more quickly.

  5. During DTX resync, the DTX CHECK RPC should not be sent to the target that will be reintegrated (with PO_COMP_ST_UP). Because such target may have removed related DTX entries.

Steps for the author:

  • Commit message follows the guidelines.
  • Appropriate Features or Test-tag pragmas were used.
  • Appropriate Functional Test Stages were run.
  • At least two positive code reviews including at least one code owner from each category referenced in the PR.
  • Testing is complete. If necessary, forced-landing label added and a reason added in a comment.

After all prior steps are complete:

  • Gatekeeper requested (daos-gatekeeper added as a reviewer).

@github-actions

Copy link
Copy Markdown

Ticket title is 'FIO crc mismatch detected on 4x node IB config while running HSN cable pulls test'
Status is 'Awaiting backport'
Job should run at elevated priority (1)
https://daosio.atlassian.net/browse/DAOS-19616

@github-actions github-actions Bot added the priority Ticket has high priority (automatically managed) label Oct 11, 2026
@daosbuild3

Copy link
Copy Markdown
Collaborator

Test stage Functional Hardware Large 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-19238/1/execution/node/1764/log

@daosbuild3

Copy link
Copy Markdown
Collaborator

Test stage Functional Cluster Box Medium 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-19238/1/execution/node/1707/log

1. On each target, before scanning the container shard for rebuild,
   the logic will wait its global stable epoch (per container based)
   to exceed rebuild epoch. It will guarantee that all the inflight
   IO result that are triggered before rebuild start is visible to
   the subsequent rebuild logic whether on DTX leader or not.

2. Before handling some modification on DTX leader, need to check
   whether the epoch for current modification is newer than pool's
   rebuild epoch or not. If not, then return -DER_UPDATE_AGAIN to
   the client that will retry the modification sometime later.

3. 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 exlcuded. 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.

4. If the modification is in rebuilding/reintegrating, then related
   modification will use synchronous DTX to refresh related global
   stable epoch more quickly.

5. During DTX resync, the DTX CHECK RPC should not be sent to the
   target that will be reintegrated (with PO_COMP_ST_UP). Because
   such target may have removed related DTX entries.

Add server side environment variable DAOS_REBUILD_CONTINUE_ON_TIMEOUT
to control whether continue rebuild process or not if got timeout when
wait for global stable epoch. It is false by default and rebuild will
failout (and restart) when got timeout. If explicitly set it as true,
then there is risk of data lost in subsequent rebuild process if race
with inflight IO. It is a temporary solution.

Signed-off-by: Fan Yong <fan.yong@hpe.com>
Co-authored-by: Xuezhao Liu <xuezhao.liu@hpe.com>
Co-authored-by: Wang Shilong <shilong.wang@hpe.com>
@Nasf-Fan
Nasf-Fan force-pushed the Nasf-Fan/DAOS-19616 branch from 65531ff to 804ebd2 Compare October 11, 2026 16:46
@daosbuild3

Copy link
Copy Markdown
Collaborator

Test stage Functional Cluster Box Medium 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-19238/2/execution/node/1699/log

@daosbuild3

Copy link
Copy Markdown
Collaborator

Test stage Functional Hardware Medium MD on SSD completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-19238/2/display/redirect

@daosbuild3

Copy link
Copy Markdown
Collaborator

Test stage Functional Hardware Medium 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-19238/2/execution/node/1939/log

@Nasf-Fan

Copy link
Copy Markdown
Contributor Author

Not need it any longer.

@Nasf-Fan Nasf-Fan closed this Oct 13, 2026
@Nasf-Fan
Nasf-Fan deleted the Nasf-Fan/DAOS-19616 branch October 13, 2026 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority Ticket has high priority (automatically managed)

Development

Successfully merging this pull request may close these issues.

2 participants