You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sentry.apache.org by "Na Li (JIRA)" <ji...@apache.org> on 2017/04/20 14:56:04 UTC
[jira] [Updated] (SENTRY-1706) Remove value-strategy for delta
change tables.
[ https://issues.apache.org/jira/browse/SENTRY-1706?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Na Li updated SENTRY-1706:
--------------------------
Lei,
I suspect when you have "value-strategy" on chang_ID, it acquires a lock on
the table.
So the order of lock acquisition before is "lock for change_ID on the
table", locks for rows. Only one thread can get the lock for table, and
then lock for rows. So deadlock did not happen.
After you remove the "value-strategy" from chang_ID, the the order of lock
acquisition is just locks for rows. Depending on how the row locks are
acquired, it could form deadlock. From the info you provided.
We can see that Thread1 gets locks that blocks Thread2 and Thread3, and
wait for lock that is blocked by Thread3.
1. Thread1: get lock {1770, S} {1771, S}, wait for lock {1793, S}
2. Thread2: wait for lock {1771, X}
3. Thread3: get lock {1793, S}, wait for lock {1770, X}
Hope that helps,
Lina
On Wed, Apr 19, 2017 at 7:13 PM, Lei (Eddy) Xu (JIRA) <ji...@apache.org>
> Remove value-strategy for delta change tables.
> ----------------------------------------------
>
> Key: SENTRY-1706
> URL: https://issues.apache.org/jira/browse/SENTRY-1706
> Project: Sentry
> Issue Type: Improvement
> Components: Sentry
> Affects Versions: sentry-ha-redesign
> Reporter: Lei (Eddy) Xu
> Assignee: Lei (Eddy) Xu
> Priority: Minor
>
> SENTRY-1643 introduces the logic of updating CHANGE ID in application logic, we dont need to specify its as auto increment field.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)