Skip to content

DAOS-18922: Unit test improvements for DAOS placement algorithm#18426

Draft
Siddarth-Raj wants to merge 1 commit into
masterfrom
daos_pl_ut_enh
Draft

DAOS-18922: Unit test improvements for DAOS placement algorithm#18426
Siddarth-Raj wants to merge 1 commit into
masterfrom
daos_pl_ut_enh

Conversation

@Siddarth-Raj

Copy link
Copy Markdown

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

@Siddarth-Raj Siddarth-Raj requested a review from nssrikanth June 3, 2026 15:38
@Siddarth-Raj Siddarth-Raj self-assigned this Jun 3, 2026
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

Errors are component not formatted correctly,Ticket number suffix is not a number. See https://daosio.atlassian.net/wiki/spaces/DC/pages/11133911069/Commit+Comments,Unable to load ticket data
https://daosio.atlassian.net/browse/DAOS-18922:

Comment thread src/placement/tests/layout_test.c
Comment thread src/placement/tests/layout_test.c
@diwakar-kristappagari

Copy link
Copy Markdown

@Siddarth-Raj, Could you please add me as a reviewer? Thanks.

Comment thread src/placement/tests/layout_test.c
Comment thread src/placement/tests/layout_test.c Outdated
Comment thread src/placement/tests/layout_test_helpers.c Outdated
Comment thread src/placement/tests/layout_test_helpers.c Outdated
Comment thread src/placement/tests/layout_test_helpers.c Outdated
Comment thread src/placement/tests/layout_test_helpers.h Outdated
@Siddarth-Raj Siddarth-Raj force-pushed the daos_pl_ut_enh branch 2 times, most recently from 2c084e1 to 83a8a76 Compare June 24, 2026 06:24
Comment thread src/placement/tests/layout_test_helpers.c
Comment thread src/placement/tests/layout_test_helpers.c Outdated
Comment thread src/placement/tests/layout_test_helpers.c
Comment thread src/placement/tests/layout_test_helpers.c
@ashokdevaraj-09

Copy link
Copy Markdown

can we consider handling the return values in following function calls
obj_class_init
ds_pool_map_tgts_update

Comment thread src/placement/tests/layout_test_helpers.c Outdated
Comment thread src/placement/tests/layout_test_helpers.c Outdated
Comment thread src/placement/tests/layout_test_helpers.c Outdated
Comment thread src/placement/tests/layout_test.c Outdated
Comment thread src/placement/tests/layout_test_helpers.h Outdated
@Siddarth-Raj Siddarth-Raj force-pushed the daos_pl_ut_enh branch 2 times, most recently from 4485af7 to 5f009bd Compare July 10, 2026 07:47
Signed-off-by: Siddarth Raj <siddarth.raj@hpe.com>
struct timespec _t0, _t1;

clock_gettime(CLOCK_MONOTONIC, &_t0);
rc = pl_obj_place(ctx->pl_map, PLT_LAYOUT_VERSION, &ctx->oids[i].oid, 0, NULL,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Every objects pool map version (omd_ver) is always sent as 1, because it's never updated.

diff[i].nr = 0;
diff[i].shard_ids = NULL;
diff[i].spare_tgts = NULL;
md = ctx->oids[i].oid;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Here we can update the objects pool map version and pass it directly to pl_obj_find_rebuild instead of using a local variable(same as pl_obj_place).
ctx->oids[i].oid.omd_ver = ver;

D_FREE(shard_ids);

/* Stage 2: advance targets to the final status */
rc = ds_pool_map_tgts_update(NULL, ctx->pool_map, tgts, opc2, false, NULL, false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The pool map version changes even when target status is changed from DOWN/DRAIN -> DOWNOUT, DOWNOUT -> UP. I suggest we update the objects pool map version in the capture_layouts before passing it to pl_obj_place.

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.

6 participants