Skip to content

Recovery related changes #197

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

Merged
merged 1 commit into from
Sep 15, 2016
Merged

Recovery related changes #197

merged 1 commit into from
Sep 15, 2016

Conversation

vikinghawk
Copy link
Contributor

This PR contains some changes related to recovery. Note i cleaned up a bunch of compiler warnings by adding the missing Override tags on methods. I can submit another PR without those changes if you guys would prefer.

Non-cosmetic changes are in AutorecoveringConnection and AutorecoveringChannel.

Fixes:

  1. fixes a NPE that can occur when a thread attempts to create a new channel after a connection has been recovered but before channel recovery has completed. More details of issue at https://groups.google.com/forum/#!topic/rabbitmq-users/7P5fYQLLP6g. Fixes the NPE in AutorecoveringChannel, but then also changed the AutorecoveryingConnection to not set the connection delegate until channel recovery is complete. This allows channel recovery to complete without error at the expense of the separate thread attempting to create a new channel of getting an AlreadyClosedException because it would happen on the old delegate.

Other changes:

  1. Added a check in recoverQueues() that skips over all the queue name change logic if the name remained the same.

@michaelklishin
Copy link
Contributor

Thank you!

this.addAutomaticRecoveryListener();
}

public void start() throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

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

This method existed for a reason. Are you 100% sure it is safe to remove it now, or a good idea to do so?

Copy link
Contributor

Choose a reason for hiding this comment

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

Digging in code history suggests that the method was introduced around the time we wanted to move Langohr and March Hare to use recovery implemented by this client, and that's why 1e603d9 calls out Langohr specifically.

So far it looks like it's safe to delete this method.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, Langohr recovery test suite works just fine with this change.

@acogoluegnes acogoluegnes merged commit c8d7fff into rabbitmq:master Sep 15, 2016
@acogoluegnes
Copy link
Contributor

@vikinghawk Thanks!

@michaelklishin
Copy link
Contributor

This was back ported for 3.6.6 => changing milestone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants