hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Vary (JIRA)" <>
Subject [jira] [Commented] (HIVE-14979) Removing stale Zookeeper locks at HiveServer2 initialization
Date Tue, 18 Oct 2016 08:36:58 GMT


Peter Vary commented on HIVE-14979:

[~sershe], thanks for the review!

I am not a zookeeper expert so feel free to correct me if I am wrong somewhere.

This was my reasoning:
- Ephemeral nodes kept alive until the session is alive
- The session is alive until the client sending requests, or extra PING request if there is
no other request. 

If the HiveServer2 is down and the session timeout is not yet reached, then even for the ephemeral
nodes the locks will be there. In HiveConf the SessionTimeout is set to 1200000ms which seems
pretty excessive to me, but set by HIVE-8890 (HiveServer2 dynamic service discovery: use persistent
ephemeral nodes curator recipe). This means the ephemeral locks could stay there after the
crash for 20 minutes. 

For this reason I think the administrator would need this removal tool, or we should set the
timeout to a lower value.

[~vgumashta], [~thejas]: Is it possible to lower the default of the HIVE_ZOOKEEPER_SESSION_TIMEOUT,
or there will be performance and/or stability issues if we change this value?


> Removing stale Zookeeper locks at HiveServer2 initialization
> ------------------------------------------------------------
>                 Key: HIVE-14979
>                 URL:
>             Project: Hive
>          Issue Type: Improvement
>          Components: Locking
>            Reporter: Peter Vary
>            Assignee: Peter Vary
>         Attachments: HIVE-14979.patch
> HiveServer2 could use Zookeeper to store token that indicate that particular tables are
locked with the creation of persistent Zookeeper objects. 
> A problem can occur when a HiveServer2 instance creates a lock on a table and the HiveServer2
instances crashes ("Out of Memory" for example) and the locks are not released in Zookeeper.
This lock will then remain until it is manually cleared by an admin.
> There should be a way to remove stale locks at HiveServer2 initialization, helping the
admins life.

This message was sent by Atlassian JIRA

View raw message