[
https://issues.apache.org/jira/browse/HIVE-23283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Peter Vary updated HIVE-23283:
------------------------------
Fix Version/s: 4.0.0
Resolution: Fixed
Status: Resolved (was: Patch Available)
Pushed to master.
Thanks for the patch [~Marton Bod] and [~dkuzmenko] for the review!
> Generate random temp ID for lock enqueue and commitTxn
> ------------------------------------------------------
>
> Key: HIVE-23283
> URL: https://issues.apache.org/jira/browse/HIVE-23283
> Project: Hive
> Issue Type: Improvement
> Reporter: Marton Bod
> Assignee: Marton Bod
> Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-23283.1.patch
>
>
> In order to optimize the S4U scope of enqueue lock and commitTxn, currently a
> hardcoded constant (-1) is used to first insert all the lock and ws entries
> with a temporary lockID/commitID. However, in a concurrent environment this
> seems to cause some performance degradation (and deadlock issues with some
> rdbms) as multiple concurrent transactions are trying to insert rows with the
> same primary key (e.g. (-1, 1), (-1, 2), (-1, 3), .. etc. for (extID/intID)
> in HIVE_LOCKS). The proposed solution is to replace the constant with a
> random generated negative number, which seems to resolve this issue.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)