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

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

                Author: ASF GitHub Bot
            Created on: 25/Apr/22 07:23
            Start Date: 25/Apr/22 07:23
    Worklog Time Spent: 10m 
      Work Description: veghlaci05 commented on code in PR #3172:
URL: https://github.com/apache/hive/pull/3172#discussion_r857326564


##########
ql/src/java/org/apache/hadoop/hive/ql/DriverTxnHandler.java:
##########
@@ -303,8 +303,15 @@ void setWriteIdForAcidFileSinks() throws 
SemanticException, LockException {
 
   private void allocateWriteIdForAcidAnalyzeTable() throws LockException {
     if (driverContext.getPlan().getAcidAnalyzeTable() != null) {
+      //Inside a compaction transaction, only stats gathering is running which 
is not requiring a new write id,
+      //and for duplicate compaction detection it is necessary to not 
increment it.
+      boolean isWithinCompactionTxn = 
Boolean.parseBoolean(SessionState.get().getHiveVariables().get(Constants.INSIDE_COMPACTION_TRANSACTION_FLAG));

Review Comment:
   I think you meant 
   `driverContext.getTxnType().equals(TxnType.COMPACTION)`
   otherwise I don't understand your point :)





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

    Worklog Id:     (was: 761618)
    Time Spent: 0.5h  (was: 20m)

> Worker shouldn't inject duplicate entries in `ready for cleaning` state into 
> the compaction queue
> -------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-26107
>                 URL: https://issues.apache.org/jira/browse/HIVE-26107
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: László Végh
>            Assignee: László Végh
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> How to reproduce:
> 1) create an acid table and load some data ;
> 2) manually trigger the compaction for the table several times;
> 4) inspect compaction_queue: There are multiple entries in 'ready for 
> cleaning' state for the same table.
>  
> Expected behavior: All compaction request after the first one should be 
> rejected until the table is changed again.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to