Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/issue 509 #539

Merged
merged 13 commits into from Feb 1, 2021
Merged

Fix/issue 509 #539

merged 13 commits into from Feb 1, 2021

Conversation

iparask
Copy link
Contributor

@iparask iparask commented Jan 27, 2021

This PR fixes the connection closed exception we were getting for long-running tasks. When the connection or the channel is closed, we receive an exception from pika. We then handle that exception by creating a new connection and channel and send the message again.

Unfortunately, we cannot know the actual RMQ server state for a connection or channel through their is_open or is_closed methods.

Although there is a replication in the messaging code, we avoid the overhead of creating a new connection and channel for every message.

@iparask iparask linked an issue Jan 27, 2021 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jan 27, 2021

Codecov Report

Merging #539 (1baf30f) into devel (4bb8e6c) will increase coverage by 0.48%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##            devel     #539      +/-   ##
==========================================
+ Coverage   61.80%   62.29%   +0.48%     
==========================================
  Files          21       21              
  Lines        2312     2339      +27     
==========================================
+ Hits         1429     1457      +28     
+ Misses        883      882       -1     
Impacted Files Coverage Δ
src/radical/entk/execman/rp/task_manager.py 20.24% <0.00%> (-1.91%) ⬇️
src/radical/entk/execman/base/task_manager.py 78.83% <70.00%> (+10.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bb8e6c...1baf30f. Read the comment docs.

@iparask iparask marked this pull request as ready for review January 28, 2021 18:11
Copy link
Member

@andre-merzky andre-merzky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Contributor

@mturilli mturilli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I would not have renamed channel but if you prefer that I am fine with it.

@iparask
Copy link
Contributor Author

iparask commented Feb 1, 2021

I would not have renamed channel but if you prefer that I am fine with it.

I did it because I was getting some error somewhere, but I do not remember right now what it was.

Thank you both for reviewing!

@iparask iparask merged commit da2bfed into devel Feb 1, 2021
@iparask iparask deleted the fix/issue_509 branch February 1, 2021 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Connection reset while transferring stages
3 participants