Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ private void cleanUsingLocation(CompactionInfo ci, String path, boolean requires
deleted = fsRemover.clean(getCleaningRequestBasedOnLocation(ci, path));
}
if (!deleted.isEmpty()) {
ci.setSoftDelete(true);
txnHandler.markCleaned(ci);
} else {
txnHandler.clearCleanerStart(ci);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public class CompactionInfo implements Comparable<CompactionInfo> {
private String fullPartitionName = null;
private String fullTableName = null;
private StringableMap propertiesMap;
private boolean softDelete;

public CompactionInfo(String dbname, String tableName, String partName, CompactionType type) {
this.dbname = dbname;
Expand Down Expand Up @@ -190,6 +191,7 @@ public String toString() {
.append("numberOfBuckets", numberOfBuckets)
.append("orderByClause", orderByClause)
.append("minOpenWriteTxnId", minOpenWriteTxnId)
.append("softDelete", softDelete)
.build();
}

Expand Down Expand Up @@ -368,4 +370,12 @@ public void setWriteIds(boolean hasUncompactedAborts, Set<Long> writeIds) {
public boolean isAbortedTxnCleanup() {
return type == CompactionType.ABORT_TXN_CLEANUP;
}

public void setSoftDelete(boolean softDelete) {
this.softDelete = softDelete;
}

public boolean isSoftDelete() {
return softDelete;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ public MarkCleanedFunction(CompactionInfo info) {
public Void execute(MultiDataSourceJdbcResource jdbcResource) throws MetaException {
NamedParameterJdbcTemplate jdbcTemplate = jdbcResource.getJdbcTemplate();
MapSqlParameterSource param;
if (info.isSoftDelete()) {
// Remove compaction queue record and return
removeCompactionAndAbortRetryEntries(info, jdbcTemplate);
return null;
}
Comment thread
VenuReddy2103 marked this conversation as resolved.

if (!info.isAbortedTxnCleanup()) {
param = new MapSqlParameterSource()
.addValue("id", info.id)
Expand Down
Loading