[ https://issues.apache.org/jira/browse/HIVE-25883?focusedWorklogId=712662&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-712662 ]
ASF GitHub Bot logged work on HIVE-25883: ----------------------------------------- Author: ASF GitHub Bot Created on: 21/Jan/22 07:57 Start Date: 21/Jan/22 07:57 Worklog Time Spent: 10m Work Description: deniskuzZ commented on a change in pull request #2958: URL: https://github.com/apache/hive/pull/2958#discussion_r789180459 ########## File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Cleaner.java ########## @@ -410,6 +409,10 @@ private boolean removeFiles(String location, ValidWriteIdList writeIdList, Compa // Including obsolete directories for partitioned tables can result in data loss. obsoleteDirs = dir.getAbortedDirectories(); } + if (obsoleteDirs.isEmpty() && !dir.hasDataBelowWatermark(writeIdList.getHighWatermark())) { Review comment: that won't work as dir.getCurrentDirectories() is limited by validWriteId list that might contain an open txn: try ```` Table t = newTable("default", "camtc", false); openTxn(); addBaseFile(t, null, 19L, 20); addBaseFile(t, null, 20L, 20); addDeltaFile(t, null, 21L, 22L, 2); burnThroughTransactions("default", "camtc", 22); addDeltaFile(t, null, 24L, 25L, 2); burnThroughTransactions("default", "camtc", 3); CompactionRequest rqst = new CompactionRequest("default", "camtc", CompactionType.MAJOR); long compactTxn = compactInTxn(rqst); addBaseFile(t, null, 25L, 25, compactTxn); startCleaner(); ```` in the above test, obsolete and current dirs would be empty. you should list the whole dir: ```` new FileGenerator(context, ()->dir.getFileSystem(conf), dir, useFileIds, ugi) ```` -- 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. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 712662) Time Spent: 0.5h (was: 20m) > Enhance Compaction Cleaner to skip when there is nothing to do > -------------------------------------------------------------- > > Key: HIVE-25883 > URL: https://issues.apache.org/jira/browse/HIVE-25883 > Project: Hive > Issue Type: Bug > Reporter: Zoltan Haindrich > Assignee: Zoltan Haindrich > Priority: Major > Labels: pull-request-available > Time Spent: 0.5h > Remaining Estimate: 0h > > the cleaner works the following way: > * it identifies obsolete directories (delta dirs ; which doesn't have open > txns) > * removes them and done > if there are no obsolete directoris that is attributed to that there might be > open txns so the request should be retried later. > however if for some reason the directory was already cleaned - similarily it > has no obsolete directories; and thus the request is retried for forever -- This message was sent by Atlassian Jira (v8.20.1#820001)