Skip to content

Commit

Permalink
Align range and default value for deletes_pct_allowed in merge policy (
Browse files Browse the repository at this point in the history
…#7730)

Adjust the range and default value for deletes_pct_allowed in merge policy for more control and optimal disk usage (#7360)

Signed-off-by: Nikhil Kumar <[email protected]>
Co-authored-by: Nikhil Kumar <[email protected]>
  • Loading branch information
nkumar04 and Nikhil Kumar authored Jun 12, 2023
1 parent 584617e commit 9b2b3c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Add ZSTD compression for snapshotting ([#2996](https://github.com/opensearch-project/OpenSearch/pull/2996))
- Change `com.amazonaws.sdk.ec2MetadataServiceEndpointOverride` to `aws.ec2MetadataServiceEndpoint` ([7372](https://github.com/opensearch-project/OpenSearch/pull/7372/))
- Change `com.amazonaws.sdk.stsEndpointOverride` to `aws.stsEndpointOverride` ([7372](https://github.com/opensearch-project/OpenSearch/pull/7372/))
- Align range and default value for deletes_pct_allowed in merge policy ([#7730](https://github.com/opensearch-project/OpenSearch/pull/7730))

### Deprecated

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
*
* Controls the maximum percentage of deleted documents that is tolerated in
* the index. Lower values make the index more space efficient at the
* expense of increased CPU and I/O activity. Values must be between <code>20</code> and
* <code>50</code>. Default value is <code>33</code>.
* expense of increased CPU and I/O activity. Values must be between <code>5</code> and
* <code>50</code>. Default value is <code>20</code>.
* </ul>
*
* <p>
Expand Down Expand Up @@ -136,7 +136,7 @@ public final class MergePolicyConfig {
public static final ByteSizeValue DEFAULT_MAX_MERGED_SEGMENT = new ByteSizeValue(5, ByteSizeUnit.GB);
public static final double DEFAULT_SEGMENTS_PER_TIER = 10.0d;
public static final double DEFAULT_RECLAIM_DELETES_WEIGHT = 2.0d;
public static final double DEFAULT_DELETES_PCT_ALLOWED = 33.0d;
public static final double DEFAULT_DELETES_PCT_ALLOWED = 20.0d;
public static final Setting<Double> INDEX_COMPOUND_FORMAT_SETTING = new Setting<>(
"index.compound_format",
Double.toString(TieredMergePolicy.DEFAULT_NO_CFS_RATIO),
Expand Down Expand Up @@ -189,7 +189,7 @@ public final class MergePolicyConfig {
public static final Setting<Double> INDEX_MERGE_POLICY_DELETES_PCT_ALLOWED_SETTING = Setting.doubleSetting(
"index.merge.policy.deletes_pct_allowed",
DEFAULT_DELETES_PCT_ALLOWED,
20.0d,
5.0d,
50.0d,
Property.Dynamic,
Property.IndexScope
Expand Down

0 comments on commit 9b2b3c9

Please sign in to comment.