Skip to content

Commit

Permalink
- tread -DER_DEADLINE_EXPIRED same as DER_TIMEDOUT for some situations
Browse files Browse the repository at this point in the history
Required-githooks: true

Signed-off-by: Alexander A Oganezov <[email protected]>
  • Loading branch information
frostedcmos committed Oct 23, 2024
1 parent 1361a62 commit 172abcb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cart/crt_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ crt_rpc_complete_and_unlock(struct crt_rpc_priv *rpc_priv, int rc)

if (rc == -DER_CANCELED)
rpc_priv->crp_state = RPC_STATE_CANCELED;
else if (rc == -DER_TIMEDOUT)
else if (rc == -DER_TIMEDOUT || rc == -DER_DEADLINE_EXPIRED)
rpc_priv->crp_state = RPC_STATE_TIMEOUT;
else if (rc == -DER_UNREACH)
rpc_priv->crp_state = RPC_STATE_FWD_UNREACH;
Expand Down
2 changes: 1 addition & 1 deletion src/cart/crt_swim.c
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ static int64_t crt_swim_progress_cb(crt_context_t crt_ctx, int64_t timeout_us, v
if (grp_priv->gp_size > 1)
D_ERROR("SWIM shutdown\n");
swim_self_set(ctx, SWIM_ID_INVALID);
} else if (rc == -DER_TIMEDOUT || rc == -DER_CANCELED) {
} else if (rc == -DER_TIMEDOUT || rc == -DER_CANCELED || rc == -DER_DEADLINE_EXPIRED) {
uint64_t now = swim_now_ms();

crt_swim_update_last_unpack_hlc(csm);
Expand Down
2 changes: 1 addition & 1 deletion src/include/daos/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ static inline bool
daos_crt_network_error(int err)
{
return err == -DER_HG || err == -DER_UNREACH || err == -DER_CANCELED ||
err == -DER_NOREPLY || err == -DER_OOG;
err == -DER_NOREPLY || err == -DER_OOG || err == -DER_DEADLINE_EXPIRED;
}

/** See crt_quiet_error. */
Expand Down
2 changes: 1 addition & 1 deletion src/utils/self_test/self_test_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,4 +810,4 @@ run_self_test(struct st_size_params all_params[], int num_msg_sizes, int rep_cou
/* Make sure first error is returned, if applicable */
ret = ((ret == 0) ? cleanup_ret : ret);
return ret;
}
}

0 comments on commit 172abcb

Please sign in to comment.