You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Gopal Vijayaraghavan (Jira)" <ji...@apache.org> on 2021/12/06 17:58:00 UTC

[jira] [Comment Edited] (HIVE-25777) ACID: Pick the compactor transaction over insert dir

    [ https://issues.apache.org/jira/browse/HIVE-25777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17454152#comment-17454152 ] 

Gopal Vijayaraghavan edited comment on HIVE-25777 at 12/6/21, 5:57 PM:
-----------------------------------------------------------------------

Assumption is that that fix is somewhere here to ensure the old base dir gets thrown out (if write-id == write-id, but txn-id is valid + present for only one)

https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java#L1815


was (Author: gopalv):
This fix needs to happen when AcidUtils.ParseDeltaLight is getting built using the visibilityTxnId field in it.

> ACID: Pick the compactor transaction over insert dir
> ----------------------------------------------------
>
>                 Key: HIVE-25777
>                 URL: https://issues.apache.org/jira/browse/HIVE-25777
>             Project: Hive
>          Issue Type: Bug
>          Components: Transactions
>    Affects Versions: 3.1.2, 4.0.0
>            Reporter: Gopal Vijayaraghavan
>            Priority: Major
>
> If there are two competing versions of a particular write-id, one from the compactor and another from the original insert, always pick the compactor one once it is committed.
> If the directory structure looks like 
> {code}
> base_000011/
> base_000011_v192/
> {code}
> Then always pick the v192 transaction if txnid=192 is committed.
> This is required to ensure that the raw base_ dir can be deleted safely on non-atomic directory deletions (like s3), without a race condition between getSplits and the actual file-reader.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)