<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Hive concurrency - lost update in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Hive-concurrency-lost-update/m-p/335613#M231987</link>
    <description>&lt;P&gt;Hi, I am seeing some situations where I have two Hive SQL commands running concurrently and I'm getting a lost update.&amp;nbsp; I am running Hive 2.3.6 on EMR with hive.support.concurrency = true and I believe this shouldn't be happening based on what I understand about Hive table locking.&amp;nbsp; (I am not using ACID transactions but the table locking should still prevent lost update as far as I know;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Specifically I have a "load data" statement loading data into table T from an S3 location.&amp;nbsp; I have an "insert overwrite T select * from T" table running concurrently from another Hive connection that deletes some rows from T but should not be affecting rows from the load data statement.&amp;nbsp; I am seeing that the data from the load data statement disappears after the insert overwrite finishes.&amp;nbsp; My understanding is that the load data and insert overwrite should create an exclusive table lock on T so they should allow each other to finish before reading or writing data from T.&amp;nbsp; (I checked this using "show locks" and they do definitely create an exclusive lock.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone seen this issue before and are there any Hive settings I can try changing to prevent this behavior?&lt;/P&gt;</description>
    <pubDate>Thu, 03 Feb 2022 22:27:35 GMT</pubDate>
    <dc:creator>KFredrickson</dc:creator>
    <dc:date>2022-02-03T22:27:35Z</dc:date>
    <item>
      <title>Hive concurrency - lost update</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-concurrency-lost-update/m-p/335613#M231987</link>
      <description>&lt;P&gt;Hi, I am seeing some situations where I have two Hive SQL commands running concurrently and I'm getting a lost update.&amp;nbsp; I am running Hive 2.3.6 on EMR with hive.support.concurrency = true and I believe this shouldn't be happening based on what I understand about Hive table locking.&amp;nbsp; (I am not using ACID transactions but the table locking should still prevent lost update as far as I know;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Specifically I have a "load data" statement loading data into table T from an S3 location.&amp;nbsp; I have an "insert overwrite T select * from T" table running concurrently from another Hive connection that deletes some rows from T but should not be affecting rows from the load data statement.&amp;nbsp; I am seeing that the data from the load data statement disappears after the insert overwrite finishes.&amp;nbsp; My understanding is that the load data and insert overwrite should create an exclusive table lock on T so they should allow each other to finish before reading or writing data from T.&amp;nbsp; (I checked this using "show locks" and they do definitely create an exclusive lock.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone seen this issue before and are there any Hive settings I can try changing to prevent this behavior?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 22:27:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-concurrency-lost-update/m-p/335613#M231987</guid>
      <dc:creator>KFredrickson</dc:creator>
      <dc:date>2022-02-03T22:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Hive concurrency - lost update</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-concurrency-lost-update/m-p/335690#M232003</link>
      <description>&lt;P&gt;This was a result of a bug in my code and not anything to do with Hive itself - please ignore.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Feb 2022 10:30:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-concurrency-lost-update/m-p/335690#M232003</guid>
      <dc:creator>KFredrickson</dc:creator>
      <dc:date>2022-02-06T10:30:59Z</dc:date>
    </item>
  </channel>
</rss>

