Skip to content

DAOS-19265 pool: refine pool_discard() target validation#18643

Open
liuxuezhao wants to merge 1 commit into
masterfrom
lxz/discard_refine
Open

DAOS-19265 pool: refine pool_discard() target validation#18643
liuxuezhao wants to merge 1 commit into
masterfrom
lxz/discard_refine

Conversation

@liuxuezhao

Copy link
Copy Markdown
Contributor

pool_discard() previously sent the POOL_TGT_DISCARD RPC to target engines using the caller-supplied pool_target_addr array as-is, without validating it against the pool map. On the target engine side, ds_pool_tgt_discard_ult() then relied on its own (possibly stale) local pool map, using ex_status = PO_COMP_ST_UP | PO_COMP_ST_UPIN | PO_COMP_ST_DRAIN passed to
ds_pool_thread_collective(), to exclude targets from the discard. When the target engine did not yet have the latest pool map, this could lead to targets holding useful data being discarded, or targets needing a discard being skipped.

Add pool_discard_filter_tgts() to validate/filter the input pool_target_addr array against the pool service leader's authoritative pool map before building the POOL_TGT_DISCARD RPC:

  • for REINT, only keep targets currently in PO_COMP_ST_DOWN or PO_COMP_ST_DOWNOUT.
  • for EXTEND, only keep targets currently in PO_COMP_ST_NEW, or targets not yet present in the pool map at all (brand new ranks/targets being added can't hold pool data yet, so they are always safe to discard).

On the target engine side, ds_pool_tgt_discard_ult() no longer needs to exclude targets based on its local pool map status, since the RPC input list has already been validated and filtered by the leader. pool_child_discard() already restricts the discard to targets present in the RPC's target list.

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).

@liuxuezhao liuxuezhao requested review from a team as code owners July 10, 2026 09:24
@github-actions

Copy link
Copy Markdown

Ticket title is 'metadata storage doesn't seem to improve even after deleting containers in a pool (when the pool hit DER_NO_SPACE issue during rebuild operation)'
Status is 'In Progress'
Labels: 'md_on_ssd,test_2.8.0rc'
https://daosio.atlassian.net/browse/DAOS-19265

@liuxuezhao liuxuezhao force-pushed the lxz/discard_refine branch 2 times, most recently from 64761ce to aaddb1c Compare July 10, 2026 13:27
pool_discard() previously sent the POOL_TGT_DISCARD RPC to target
engines using the caller-supplied pool_target_addr array as-is,
without validating it against the pool map. On the target engine
side, ds_pool_tgt_discard_ult() then relied on its own (possibly
stale) local pool map, using ex_status = PO_COMP_ST_UP |
PO_COMP_ST_UPIN | PO_COMP_ST_DRAIN passed to
ds_pool_thread_collective(), to exclude targets from the discard.
When the target engine did not yet have the latest pool map, this
could lead to targets holding useful data being discarded, or
targets needing a discard being skipped.

Add pool_discard_filter_tgts() to validate/filter the input
pool_target_addr array against the pool service leader's
authoritative pool map before building the POOL_TGT_DISCARD RPC:
- for REINT, only keep targets currently in PO_COMP_ST_DOWN or
  PO_COMP_ST_DOWNOUT.
- for EXTEND, only keep targets currently in PO_COMP_ST_NEW, or
  targets not yet present in the pool map at all (brand new
  ranks/targets being added can't hold pool data yet, so they are
  always safe to discard).

On the target engine side, ds_pool_tgt_discard_ult() no longer needs
to exclude targets based on its local pool map status, since the RPC
input list has already been validated and filtered by the leader.
pool_child_discard() already restricts the discard to targets
present in the RPC's target list.

Signed-off-by: Xuezhao Liu <xuezhao.liu@hpe.com>
@liuxuezhao liuxuezhao force-pushed the lxz/discard_refine branch from aaddb1c to 74cb258 Compare July 10, 2026 14:31
@daosbuild3

Copy link
Copy Markdown
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-18643/4/execution/node/1768/log

@daosbuild3

Copy link
Copy Markdown
Collaborator

Test stage Functional Cluster Box Medium 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-18643/4/execution/node/1748/log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants