[jira] [Updated] (HIVE-20906) Are Hive locks ephemeral ?

2022-10-21 Thread Stamatis Zampetakis (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-20906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stamatis Zampetakis updated HIVE-20906:
---
Fix Version/s: (was: 3.1.1)

I cleared the fixVersion field since this ticket is not resolved. Please review 
this ticket and if the fix is already committed to a specific version please 
set the version accordingly and mark the ticket as RESOLVED.

According to the JIRA guidelines 
(https://cwiki.apache.org/confluence/display/Hive/HowToContribute) the 
fixVersion should be set only when the issue is resolved/closed.

> Are Hive locks ephemeral ?
> --
>
> Key: HIVE-20906
> URL: https://issues.apache.org/jira/browse/HIVE-20906
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 2.3.0, 2.3.3, 3.1.1
>Reporter: Rajesh KSV
>Priority: Major
> Attachments: ephemeral.patch
>
>
> I am using Hive 2.3.3.
>   
>  According to docs 
> ([https://cwiki.apache.org/confluence/display/Hive/Locking]), they are 
> ephemeral. But in the Zookeeper and Hive source Code, they seemed to be 
> non-ephemeral. 
>   
>  I ran the following query in Hive.
>   
>  *lock table discovery.defaultns*
>   
>  When I see the lock in zookeeper, it doesn't look like ephemeral node.
>   
>  [zk: localhost:2181(CONNECTED) 55] get 
> /hive_zookeeper_namespace/discovery/defaultns/LOCK-EXCLUSIVE-00
>  
> hive_20181112191555_d6640955-2806-4fa7-9e52-30d04c377a04:1542030355565:EXPLICIT:lock
>  table discovery.defaultns exclusive:10.33.222.139
>  cZxid = 0x2400296808
>  ctime = Mon Nov 12 19:15:55 IST 2018
>  mZxid = 0x2400296808
>  mtime = Mon Nov 12 19:15:55 IST 2018
>  pZxid = 0x2400296808
>  cversion = 0
>  dataVersion = 0
>  aclVersion = 0
>  *ephemeralOwner = 0x0*
>  dataLength = 134
>  numChildren = 0
>   
>  Also in the code - 
> [https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveTxnManagerImpl.java],
>  the lock is KeepAlive/PERSISTENT and not EPHIMERAL. Current code is
>   
>  *HiveLock lck = lockMgr.lock(new HiveLockObject(tbl, lockData), mode, 
> true);* 
> Either the docs are misleading or code is incorrect.
> If docs are correct, then it should be
> *HiveLock lck = lockMgr.lock(new HiveLockObject(tbl, lockData), mode, 
> false);* 
> The patch is the same. 
> Please correct me if I am wrong. This is my first ever Jira/Patch in Hive 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (HIVE-20906) Are Hive locks ephemeral ?

2018-11-12 Thread Rajesh KSV (JIRA)


 [ 
https://issues.apache.org/jira/browse/HIVE-20906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rajesh KSV updated HIVE-20906:
--
Summary: Are Hive locks ephemeral ?  (was: Hive locks are not really 
ephemeral)

> Are Hive locks ephemeral ?
> --
>
> Key: HIVE-20906
> URL: https://issues.apache.org/jira/browse/HIVE-20906
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 2.3.0, 2.3.3, 3.1.1
>Reporter: Rajesh KSV
>Priority: Major
> Fix For: 3.1.1
>
> Attachments: ephemeral.patch
>
>
> I am using Hive 2.3.3.
>   
>  According to docs 
> ([https://cwiki.apache.org/confluence/display/Hive/Locking]), they are 
> ephemeral. But in the Zookeeper and Hive source Code, they seemed to be 
> non-ephemeral. 
>   
>  I ran the following query in Hive.
>   
>  *lock table discovery.defaultns*
>   
>  When I see the lock in zookeeper, it doesn't look like ephemeral node.
>   
>  [zk: localhost:2181(CONNECTED) 55] get 
> /hive_zookeeper_namespace/discovery/defaultns/LOCK-EXCLUSIVE-00
>  
> hive_20181112191555_d6640955-2806-4fa7-9e52-30d04c377a04:1542030355565:EXPLICIT:lock
>  table discovery.defaultns exclusive:10.33.222.139
>  cZxid = 0x2400296808
>  ctime = Mon Nov 12 19:15:55 IST 2018
>  mZxid = 0x2400296808
>  mtime = Mon Nov 12 19:15:55 IST 2018
>  pZxid = 0x2400296808
>  cversion = 0
>  dataVersion = 0
>  aclVersion = 0
>  *ephemeralOwner = 0x0*
>  dataLength = 134
>  numChildren = 0
>   
>  Also in the code - 
> [https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveTxnManagerImpl.java],
>  the lock is KeepAlive/PERSISTENT and not EPHIMERAL. Current code is
>   
>  *HiveLock lck = lockMgr.lock(new HiveLockObject(tbl, lockData), mode, 
> true);* 
> Either the docs are misleading or code is incorrect.
> If docs are correct, then it should be
> *HiveLock lck = lockMgr.lock(new HiveLockObject(tbl, lockData), mode, 
> false);* 
> The patch is the same. 
> Please correct me if I am wrong. This is my first ever Jira/Patch in Hive 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)