Skip to content

Commit 4af0f71

Browse files
Increase default floor segment size to 16MB (#17699)
Signed-off-by: Prudhvi Godithi <[email protected]>
1 parent 15d27a1 commit 4af0f71

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1818

1919
### Changed
2020
- Migrate BC libs to their FIPS counterparts ([#14912](https://github.com/opensearch-project/OpenSearch/pull/14912))
21+
- Increase the floor segment size to 16MB ([#17699](https://github.com/opensearch-project/OpenSearch/pull/17699))
2122

2223
### Dependencies
2324
- Bump `com.nimbusds:nimbus-jose-jwt` from 9.41.1 to 10.0.2 ([#17607](https://github.com/opensearch-project/OpenSearch/pull/17607), [#17669](https://github.com/opensearch-project/OpenSearch/pull/17669))

server/src/main/java/org/opensearch/index/LogByteSizeMergePolicyProvider.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ public class LogByteSizeMergePolicyProvider implements MergePolicyProvider {
5050
private final Logger logger;
5151
private final boolean mergesEnabled;
5252

53-
public static final ByteSizeValue DEFAULT_MIN_MERGE = new ByteSizeValue(2, ByteSizeUnit.MB);
53+
/**
54+
* Use 16MB floor size to match Lucene default.
55+
* See <a href="https://github.com/apache/lucene/pull/14189">...</a>
56+
*/
57+
public static final ByteSizeValue DEFAULT_MIN_MERGE = new ByteSizeValue(16, ByteSizeUnit.MB);
5458
public static final int DEFAULT_MERGE_FACTOR = 10;
5559

5660
public static final ByteSizeValue DEFAULT_MAX_MERGED_SEGMENT = new ByteSizeValue(5, ByteSizeUnit.GB);

server/src/main/java/org/opensearch/index/TieredMergePolicyProvider.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,13 @@ public final class TieredMergePolicyProvider implements MergePolicyProvider {
136136
private final boolean mergesEnabled;
137137

138138
public static final double DEFAULT_EXPUNGE_DELETES_ALLOWED = 10d;
139-
public static final ByteSizeValue DEFAULT_FLOOR_SEGMENT = new ByteSizeValue(2, ByteSizeUnit.MB);
139+
140+
/**
141+
* Use 16MB floor size to match Lucene default.
142+
* See <a href="https://github.com/apache/lucene/pull/14189">...</a>
143+
*/
144+
public static final ByteSizeValue DEFAULT_FLOOR_SEGMENT = new ByteSizeValue(16, ByteSizeUnit.MB);
145+
140146
public static final int DEFAULT_MAX_MERGE_AT_ONCE = 10;
141147
public static final ByteSizeValue DEFAULT_MAX_MERGED_SEGMENT = new ByteSizeValue(5, ByteSizeUnit.GB);
142148
public static final double DEFAULT_SEGMENTS_PER_TIER = 10.0d;

0 commit comments

Comments
 (0)