Skip to content

Commit

Permalink
UCP/EP/FLUSH: fix error handling flow
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeny-leksikov committed Nov 23, 2020
1 parent 0041987 commit a52009e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/ucp/rma/flush.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@

static void ucp_ep_flush_error(ucp_request_t *req, ucs_status_t status)
{
if (ucp_ep_config(req->send.ep)->key.err_mode != UCP_ERR_HANDLING_MODE_PEER) {
ucs_error("error during flush: %s", ucs_status_string(status));
}
ucs_log_level_t level = (ucp_ep_config(req->send.ep)->key.err_mode ==
UCP_ERR_HANDLING_MODE_PEER) ?
UCS_LOG_LEVEL_TRACE_REQ : UCS_LOG_LEVEL_ERROR;

req->status = status;
--req->send.state.uct_comp.count;
ucs_log(level, "req %p: error during flush: %s, flush comp %p count reduced to %d",
req, ucs_status_string(status), &req->send.state.uct_comp,
req->send.state.uct_comp.count);
}

static int ucp_ep_flush_is_completed(ucp_request_t *req)
Expand Down Expand Up @@ -129,7 +132,7 @@ static void ucp_ep_flush_progress(ucp_request_t *req)
}
} else {
ucp_ep_flush_error(req, status);
break;
req->send.flush.started_lanes |= UCS_BIT(lane);
}
}

Expand Down

0 comments on commit a52009e

Please sign in to comment.