candlepin/candlepin — pull request #136 by dgoodwin (2012-12-12 20:37:30+00:00)
Title: 886211: Fix a deadlock in mysql.

Appears to be an issue with deadlocks when deleting a consumer
originating in the listModifying routine. Verified that the bug in
question was not *actually* using modifier entitlements, just the simple
act of looking for them across entitlements which were already deleted
caused a deadlock on mysql.

We don't need to do this when mass deleting entitlements because a
consumer was deleted, so disable this functionality when the
entitlements are getting revoked anyhow.

Made method in question package protected so @Transactional continues to
work, as it was only used by other methods in the class.

Used the one line from revokeEntitlement inside revokeAllEntitlements,
this prevents the regenModified parameter from leaking up into the
interface and around the code, when really it should be transparently
handled just by using the revoke/removeAll methods.