You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/08/10 07:25:00 UTC

[jira] [Work logged] (HIVE-24020) Automatic Compaction not working in existing partitions for Streaming Ingest with Dynamic Partition

     [ https://issues.apache.org/jira/browse/HIVE-24020?focusedWorklogId=468437&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-468437 ]

ASF GitHub Bot logged work on HIVE-24020:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Aug/20 07:24
            Start Date: 10/Aug/20 07:24
    Worklog Time Spent: 10m 
      Work Description: vpnvishv opened a new pull request #1382:
URL: https://github.com/apache/hive/pull/1382


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/Hive/HowToContribute
     2. Ensure that you have created an issue on the Hive project JIRA: https://issues.apache.org/jira/projects/HIVE/summary
     3. Ensure you have added or run the appropriate tests for your PR: 
     4. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]HIVE-XXXXX:  Your PR title ...'.
     5. Be sure to keep the PR description updated to reflect all changes.
     6. Please write your PR title to summarize what this PR proposes.
     7. If possible, provide a concise example to reproduce the issue for a faster review.
   
   -->
   
   ### What changes were proposed in this pull request?
   We need to keep info about the updated partition as well, and pass this to addDynamicPartitions. Here i am reusing addedParitions, as I don't see any effect on stats either. Reviewers please suggest if you think it can affect.
   
   ### Why are the changes needed?
   To fix automatic compaction in case of streaming ingest with dynamic partition.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   Added unit-test.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 468437)
    Remaining Estimate: 0h
            Time Spent: 10m

> Automatic Compaction not working in existing partitions for Streaming Ingest with Dynamic Partition
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-24020
>                 URL: https://issues.apache.org/jira/browse/HIVE-24020
>             Project: Hive
>          Issue Type: Bug
>          Components: Streaming, Transactions
>    Affects Versions: 4.0.0, 3.1.2
>            Reporter: Vipin Vishvkarma
>            Assignee: Vipin Vishvkarma
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> This issue happens when we try to do streaming ingest with dynamic partition on already existing partitions. I checked in the code, we have following check in the AbstractRecordWriter.
>  
> {code:java}
> PartitionInfo partitionInfo = conn.createPartitionIfNotExists(partitionValues);
> // collect the newly added partitions. connection.commitTransaction() will report the dynamically added
> // partitions to TxnHandler
> if (!partitionInfo.isExists()) {
>   addedPartitions.add(partitionInfo.getName());
> } else {
>   if (LOG.isDebugEnabled()) {
>     LOG.debug("Partition {} already exists for table {}",
>         partitionInfo.getName(), fullyQualifiedTableName);
>   }
> }
> {code}
> Above *addedPartitions* is passed to *addDynamicPartitions* during TransactionBatch commit. So in case of already existing partitions, *addedPartitions* will be empty and *addDynamicPartitions* **will not move entries from TXN_COMPONENTS to COMPLETED_TXN_COMPONENTS. This results in Initiator not able to trigger auto compaction.
> Another issue which has been observed is, we are not clearing *addedPartitions* on writer close, which results in information flowing across transactions.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)