Skip to content

DAOS-19537 array: fix set_size at chunk boundaries - #18905

Open
yangck125 wants to merge 1 commit into
daos-stack:masterfrom
yangck125:yangck/DAOS-19537-array-boundary-shrink
Open

DAOS-19537 array: fix set_size at chunk boundaries#18905
yangck125 wants to merge 1 commit into
daos-stack:masterfrom
yangck125:yangck/DAOS-19537-array-boundary-shrink

Conversation

@yangck125

Copy link
Copy Markdown

daos_array_set_size() skips the target dkey when the retained record index is zero. Shrinking to k * chunk_size + 1 therefore leaves extents after the new EOF, and daos_array_get_size() continues to report a stale size.

Process the target dkey even when record_i == 0 so records after the new EOF are punched and the retained record is checked. Add regression coverage for sizes 1 and chunk_size + 1, including size queries after reopening the array.

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

daos_array_set_size() skips the target dkey when its retained record
index is zero. Shrinking to k * chunk_size + 1 therefore leaves
extents after the new EOF, and daos_array_get_size() continues to
report the old size.

Process the target dkey regardless of the record index so records
after the new EOF are punched and the retained record is checked.
Add regression coverage for sizes 1 and chunk_size + 1, including
size queries after reopening the array.

Signed-off-by: Changke Yang <yangck125@163.com>
@yangck125
yangck125 requested review from a team as code owners August 20, 2026 16:26
@github-actions

Copy link
Copy Markdown

Ticket title is 'Array: daos_array_set_size() fails to shrink at chunk boundaries'
Status is 'Open'
https://daosio.atlassian.net/browse/DAOS-19537

@mchaarawi mchaarawi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the test and fix. it looks reasonable to me.
I have pushed the PR internally to get overall CI test result. once that passes i can land your PR to master.

@daltonbohning daltonbohning added the release-3.0.0 Targeted for release 3.0.0 label Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-3.0.0 Targeted for release 3.0.0

Development

Successfully merging this pull request may close these issues.

3 participants