[
https://issues.apache.org/jira/browse/SENTRY-872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15527974#comment-15527974
]
Alexander Kolbasov edited comment on SENTRY-872 at 9/28/16 1:05 AM:
--------------------------------------------------------------------
For MySQL with JDO optimistic locking it seems that the deadlock happens where
we update version on two objects simultaneously in the opposite order. The JDO
optimistic lock code issues statements like
{code}
UPDATE <table> SET VERSION <version> WHERE ...
{code}
which actually locks the matching object to update the version.
So we get a deadlock even with optimistic locking if we are unlucky. Also it
does DELETE on the join table which also gets row locks.
So the conclusion is that while optimistic locking may provide some other
benefits, it doesn't prevent deadlocks.
was (Author: akolb):
For MySQL with JDO optimistic locking it seems that the deadlock happens where
we update version on two objects simultaneously in the opposite order. The JDO
optimistic lock code issues statements like
{code}
UPDATE <table> SET VERSION <version> WHERE ... which actually locks the
matching object to update the version.
{code}
So we get a deadlock even with optimistic locking if we are unlucky. Also it
does DELETE on the join table which also gets row locks.
So the conclusion is that while optimistic locking may provide some other
benefits, it doesn't prevent deadlocks.
> Uber jira for HMS HA + Sentry HA redesign
> -----------------------------------------
>
> Key: SENTRY-872
> URL: https://issues.apache.org/jira/browse/SENTRY-872
> Project: Sentry
> Issue Type: Improvement
> Components: Hdfs Plugin
> Affects Versions: 1.5.0
> Reporter: Sravya Tirukkovalur
> Assignee: Sravya Tirukkovalur
> Fix For: sentry-ha-redesign
>
> Attachments: SENTRY-872.0.patch, SENTRY-872.pdf,
> SENTRY-872_design.pdf, SENTRY-872_design_v2.pdf, Sentry-872_design_v2_1.pdf
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)