Jaume M created HIVE-21052:
------------------------------

             Summary: Make sure transaction get cleaned if they are aborted 
before addPartitions is called
                 Key: HIVE-21052
                 URL: https://issues.apache.org/jira/browse/HIVE-21052
             Project: Hive
          Issue Type: Bug
          Components: Transactions
    Affects Versions: 3.1.1
            Reporter: Jaume M


If the transaction is aborted between openTxn and addPartitions and data has 
been written on the table the transaction manager will think it's an empty 
transaction and no cleaning will be done.
This is currently an issue in the streaming API and in micromanaged tables. As 
proposed by [~ekoifman] this can be solved by:

* Writing an entry with a special marker to TXN_COMPONENTS at openTxn and when 
addPartitions is called remove this entry from TXN_COMPONENTS and add the 
corresponding partition entry to TXN_COMPONENTS.
* If the cleaner finds and entry with a special marker in TXN_COMPONENTS that 
specifies that a transaction was opened and it was aborted it must generate 
jobs for the worker for every possible partition available.

cc [~ewohlstadter]



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

Reply via email to