title: Exclusive lock at Hive Table has not got released automatically when hive services restart in between
body: <p>While running Insert command <code>INSERT INTO TABLE xyz PARTITION(partition_date='2020-02-28') values('A',123, 'C',45).....</code> or <code>Alter table drop partition (alter table  xyz  drop if exists partition(partition_date='2020-02-28');</code> command in hive, if hive services got restarted in between through ambari or due to any unwanted scenario, then that acquired the exclusive lock on that partition which will remains after the restart also and for that kind of job there is no yarn application id is generated sometimes and if generated then it also got succeeded but exclusive locks remains on that table or partition, which later we have to manually released from the table or partitioned.</p>
  
  <p><img src="https://i.stack.imgur.com/HfX0q.png" alt="Exclusive Lock after Restart"></p>
  
  <p>So why these locks remains on that partition or table and how these kind of scenarios can be handle at our end?</p>
  
  <p>Is there any workaround for these kind of scenarios?</p>