Skip to content

Commit

Permalink
Remove default use of outputSegmentMaxSize in UpsertCompactMerge task
Browse files Browse the repository at this point in the history
  • Loading branch information
tibrewalpratik17 committed Jan 7, 2025
1 parent 4588f8c commit 3a2a583
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,6 @@ public static class UpsertCompactMergeTask {
*/
public static final String OUTPUT_SEGMENT_MAX_SIZE_KEY = "outputSegmentMaxSize";

/**
* default output segment size
*/
public static final String DEFAULT_OUTPUT_SEGMENT_MAX_SIZE = "200MB";

/**
* default maximum number of segments to process in a single task
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,10 @@ public static SegmentSelectionResult processValidDocIdsMetadata(Map<String, Stri
// default to Long.MAX_VALUE to avoid size-based compaction by default
long outputSegmentMaxSizeInBytes = Long.MAX_VALUE;
try {
outputSegmentMaxSizeInBytes = DataSizeUtils.toBytes(
taskConfigs.getOrDefault(MinionConstants.UpsertCompactMergeTask.OUTPUT_SEGMENT_MAX_SIZE_KEY,
MinionConstants.UpsertCompactMergeTask.DEFAULT_OUTPUT_SEGMENT_MAX_SIZE));
if (taskConfigs.containsKey(MinionConstants.UpsertCompactMergeTask.OUTPUT_SEGMENT_MAX_SIZE_KEY)) {
outputSegmentMaxSizeInBytes =
DataSizeUtils.toBytes(taskConfigs.get(MinionConstants.UpsertCompactMergeTask.OUTPUT_SEGMENT_MAX_SIZE_KEY));
}
} catch (Exception e) {
LOGGER.warn("Invalid value for outputSegmentMaxSizeInBytes, defaulting to Long.MAX_VALUE", e);
}
Expand Down

0 comments on commit 3a2a583

Please sign in to comment.