Skip to content

Commit

Permalink
DAOS-17001 rebuild: when self_heal is set to delay_rebuild, do not re…
Browse files Browse the repository at this point in the history
…build on exclude

delay_rebuild mode should delay the rebuild in all scenarios and not have an exception for target exclusion.
Also changed an error message to warn on shard update failure.
Shard update failure is normal during a failure, and the message was too frequent.

Testing:
`dmg pool exclude default-pool --rank 0 --target-idx 4`
while write/read workflow was running against a cluster

Signed-off-by: Chris Davis <[email protected]>
  • Loading branch information
cdavis28 committed Jan 29, 2025
1 parent 6a1c698 commit f5fb8d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/object/cli_obj.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* (C) Copyright 2016-2024 Intel Corporation.
* (C) Copyright 2025 Google LLC
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -5816,7 +5817,7 @@ dc_obj_update(tse_task_t *task, struct dtx_epoch *epoch, uint32_t map_ver,

rc = obj_update_shards_get(obj, args, map_ver, obj_auxi, &shard, &shard_cnt);
if (rc != 0) {
D_ERROR(DF_OID" get update shards failure %d\n", DP_OID(obj->cob_md.omd_id), rc);
D_WARN(DF_OID" get update shards failure %d\n", DP_OID(obj->cob_md.omd_id), rc);
D_GOTO(out_task, rc);
}

Expand Down
7 changes: 3 additions & 4 deletions src/pool/srv_pool.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* (C) Copyright 2016-2024 Intel Corporation.
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
* (C) Copyright 2025 Google LLC
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -7343,7 +7344,7 @@ pool_svc_update_map(struct pool_svc *svc, crt_opcode_t opc, bool exclude_rank,

entry = daos_prop_entry_get(&prop, DAOS_PROP_PO_SELF_HEAL);
D_ASSERT(entry != NULL);
if (!(entry->dpe_val & (DAOS_SELF_HEAL_AUTO_REBUILD | DAOS_SELF_HEAL_DELAY_REBUILD))) {
if (!(entry->dpe_val & DAOS_SELF_HEAL_AUTO_REBUILD)) {
D_DEBUG(DB_MD, "self healing is disabled\n");
D_GOTO(out, rc);
}
Expand All @@ -7360,9 +7361,7 @@ pool_svc_update_map(struct pool_svc *svc, crt_opcode_t opc, bool exclude_rank,
D_GOTO(out, rc);
}

if ((entry->dpe_val & DAOS_SELF_HEAL_DELAY_REBUILD) && exclude_rank)
delay = -1;
else if (daos_fail_check(DAOS_REBUILD_DELAY))
if (daos_fail_check(DAOS_REBUILD_DELAY))
delay = 5;

D_DEBUG(DB_MD, "map ver %u/%u\n", map_version ? *map_version : -1,
Expand Down

0 comments on commit f5fb8d7

Please sign in to comment.