Skip to content

Commit

Permalink
Merge pull request openucx#5952 from evgeny-leksikov/ucp_ep_flush_int…
Browse files Browse the repository at this point in the history
…ernal_failed

UCP/EP/FLUSH: fix too early completion for failed EP
  • Loading branch information
yosefe authored Nov 26, 2020
2 parents ab9c2f4 + a89ce65 commit 36ed228
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/ucp/rma/flush.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,6 @@ ucs_status_ptr_t ucp_ep_flush_internal(ucp_ep_h ep, unsigned uct_flags,

ucs_debug("%s ep %p", debug_name, ep);

if (ep->flags & UCP_EP_FLAG_FAILED) {
return NULL;
}

req = ucp_request_get_param(ep->worker, param,
{return UCS_STATUS_PTR(UCS_ERR_NO_MEMORY);});

Expand Down Expand Up @@ -497,7 +493,8 @@ static unsigned ucp_worker_flush_progress(void *arg)
if (UCS_PTR_IS_ERR(ep_flush_request)) {
/* endpoint flush resulted in an error */
status = UCS_PTR_STATUS(ep_flush_request);
ucs_warn("ucp_ep_flush_internal() failed: %s", ucs_status_string(status));
ucs_diag("ucp_ep_flush_internal() failed: %s",
ucs_status_string(status));
} else if (ep_flush_request != NULL) {
/* endpoint flush started, increment refcount */
++req->flush_worker.comp_count;
Expand Down
2 changes: 1 addition & 1 deletion test/gtest/ucp/ucp_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ void *ucp_test_base::entity::disconnect_nb(int worker_index, int ep_index,
return req;
}

ASSERT_UCS_OK(UCS_PTR_STATUS(req));
/* close request can be completed with any status depends on peer state */
return NULL;
}

Expand Down

0 comments on commit 36ed228

Please sign in to comment.