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

Invalid transaction return value when a vhost is removed while a policy is updated #755

Closed
dumbbell opened this issue Apr 18, 2016 · 1 comment
Assignees
Milestone

Comments

@dumbbell
Copy link
Member

In the update_polices() function in rabbit_policy.erl:

    {Xs, Qs} = rabbit_misc:execute_mnesia_transaction(
                 fun() ->
                         [mnesia:lock({table, T}, write) || T <- Tabs], %% [1]
                         case catch list(VHost) of
                             {error, {no_such_vhost, _}} ->
                                 ok; %% [2]
                               % ^^

The transaction function returns ok if it couldn't query the list of policies for the given vhost. However, the calling code expects a tuple.

I discovered it while working on #744, though I didn't try to reproduce it yet.

@dumbbell dumbbell self-assigned this Apr 18, 2016
@dumbbell dumbbell added this to the 3.6.x milestone Apr 18, 2016
@michaelklishin michaelklishin changed the title Crash if a vhost is removed while a policy is updated? Unhandled exception if a vhost is removed while a policy is updated Apr 18, 2016
@dumbbell dumbbell changed the title Unhandled exception if a vhost is removed while a policy is updated Invalid transaction return value when a vhost is removed while a policy is updated Apr 19, 2016
@dumbbell
Copy link
Member Author

This will be fixed in pull request #745.

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

No branches or pull requests

2 participants