Skip to content
Merged
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 @@ -323,10 +323,19 @@ public CompactionStats call() throws IOException, CompactionCanceledException,

clearCurrentEntryCounts();

final boolean isMinC = env.getIteratorScope() == IteratorUtil.IteratorScope.minc;

StringBuilder newThreadName = new StringBuilder();
if (isMinC) {
newThreadName.append("MinC ");
} else {
newThreadName.append("MajC ");
}

String oldThreadName = Thread.currentThread().getName();
String newThreadName =
"MajC compacting " + extent + " started " + threadStartDate + " file: " + outputFile;
Thread.currentThread().setName(newThreadName);
newThreadName.append("compacting ").append(extent).append(" started ").append(threadStartDate)
.append(" file: ").append(outputFile);
Thread.currentThread().setName(newThreadName.toString());
// Use try w/ resources for clearing the thread instead of finally because clearing may throw an
// exception. Java's handling of exceptions thrown in finally blocks is not good.
try (var ignored = setThread()) {
Expand All @@ -348,8 +357,6 @@ public CompactionStats call() throws IOException, CompactionCanceledException,
final EnumSet<FilePrefix> dropCacheFileTypes =
ConfigurationTypeHelper.getDropCacheBehindFilePrefixes(dropCachePrefixProperty);

final boolean isMinC = env.getIteratorScope() == IteratorUtil.IteratorScope.minc;

final boolean dropCacheBehindOutput = !RootTable.ID.equals(this.extent.tableId())
&& !MetadataTable.ID.equals(this.extent.tableId())
&& ((isMinC && acuTableConf.getBoolean(Property.TABLE_MINC_OUTPUT_DROP_CACHE))
Expand Down