From 4fb52da55703c4cfebe644dec8d6d6cf29ddb17d Mon Sep 17 00:00:00 2001 From: Kenneth Cain Date: Wed, 19 Aug 2026 16:51:46 -0400 Subject: [PATCH] DAOS-19396 pool: mind pool_discard() dss_rpc_send() errors Before this change, ds_pool_update_handler() for reintegration pool_discard() swallowed a nonzero rc returned by dss_rpc_send() for the POOL_TGT_DISCARD corpc. The code execution continued forward to perform pool map update (transition reintegrating engine targets to UP state). With this change, the code does *not* proceed to pool map update when the dss_rpc_send() call returns an error (e.g., -DER_TIMEDOUT). This gives retries either by the MS host daos_engine dsc_pool_client or by the test program itself (re-issuing the dmg pool reintegrate command) a chance to wait out and possibly recover from whatever communication failures are occurring among some engines and the (recently-restarted) reintegrating engine. Features: pool Signed-off-by: Kenneth Cain --- src/pool/srv_pool.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pool/srv_pool.c b/src/pool/srv_pool.c index a257d33c8c2..a68d0fc3e18 100644 --- a/src/pool/srv_pool.c +++ b/src/pool/srv_pool.c @@ -8104,6 +8104,12 @@ pool_discard(crt_context_t ctx, struct pool_svc *svc, struct pool_target_addr_li ptdi_in->ptdi_addrs.ca_count = valid_list.pta_number; uuid_copy(ptdi_in->ptdi_uuid, svc->ps_pool->sp_uuid); rc = dss_rpc_send(rpc); + /* No corpc aggregation callback is registered, so ptdo_rc cannot report a send error. */ + if (rc != 0) { + DL_ERROR(rc, DF_UUID ": dss_rpc_send POOL_TGT_DISCARD", + DP_UUID(svc->ps_pool->sp_uuid)); + D_GOTO(decref, rc); + } ptdi_out = crt_reply_get(rpc); D_ASSERT(ptdi_out != NULL); @@ -8112,6 +8118,7 @@ pool_discard(crt_context_t ctx, struct pool_svc *svc, struct pool_target_addr_li D_ERROR(DF_UUID": pool discard failed: rc: %d\n", DP_UUID(svc->ps_pool->sp_uuid), rc); +decref: crt_req_decref(rpc); out: