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

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

                Author: ASF GitHub Bot
            Created on: 11/Jan/23 18:47
            Start Date: 11/Jan/23 18:47
    Worklog Time Spent: 10m 
      Work Description: kokila-19 commented on code in PR #3822:
URL: https://github.com/apache/hive/pull/3822#discussion_r1067346055


##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java:
##########
@@ -613,8 +613,9 @@ private boolean isEligibleForCompaction(CompactionInfo ci,
         return false;
       }
 
-      if (isNoAutoCompactSet(t.getParameters())) {
-        LOG.info("Table " + tableName(t) + " marked " + 
hive_metastoreConstants.TABLE_NO_AUTO_COMPACT +
+      Map<String, String> dbParams = computeIfAbsent(ci.dbname, () -> 
resolveDatabase(ci)).getParameters();

Review Comment:
   isNoAutoCompactSet considers both db level and table level configs and so if 
we skip the db when table level config is set, then it will affect other 
tables. Also isEligibleForCompaction accepts skipTables SET and skipDBs , 
skipTables both are not used inside  isNoAutoCompactSet., I am not sure if 
there is any particular reason for this.





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

    Worklog Id:     (was: 838723)
    Time Spent: 3.5h  (was: 3h 20m)

> Create a new configuration to override "no compaction" for tables
> -----------------------------------------------------------------
>
>                 Key: HIVE-26793
>                 URL: https://issues.apache.org/jira/browse/HIVE-26793
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Kokila N
>            Assignee: Kokila N
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> Currently a simple user can create a table with 
> {color:#6a8759}no_auto_compaction=true{color} table property and create an 
> aborted write transaction writing to this table. This way a malicious user 
> can prevent cleaning up data for the aborted transaction, creating 
> performance degradation.
> This configuration should be allowed to overridden on a database level: 
> adding {color:#6a8759}no_auto_compaction=false{color} should override the 
> table level setting forcing the initiator to schedule compaction for all 
> tables.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to