Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add static node settings to set default values for max merged segment sizes #102208

Merged

Conversation

tlrx
Copy link
Member

@tlrx tlrx commented Nov 15, 2023

This change introduces 2 static node-level settings that allow to override the default values for the maximum merged segment sizes in tiered and time-based merge policies.

New default values can be defined like this in elasticsearch.yml:

indices:
  merge:
    policy:
      max_merged_segment: "5gb"
      max_time_based_merged_segment: "25gb"

@tlrx tlrx added >enhancement :Distributed/Engine Anything around managing Lucene and the Translog in an open shard. v8.12.0 labels Nov 15, 2023
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Meta label for distributed team label Nov 15, 2023
@elasticsearchmachine
Copy link
Collaborator

Hi @tlrx, I've created a changelog YAML for you.

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

Copy link
Contributor

@henningandersen henningandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.


public static final double DEFAULT_EXPUNGE_DELETES_ALLOWED = 10d;
public static final ByteSizeValue DEFAULT_FLOOR_SEGMENT = new ByteSizeValue(2, ByteSizeUnit.MB);
public static final int DEFAULT_MAX_MERGE_AT_ONCE = 10;
public static final ByteSizeValue DEFAULT_MAX_MERGED_SEGMENT = new ByteSizeValue(5, ByteSizeUnit.GB);
public static final Setting<ByteSizeValue> DEFAULT_MAX_MERGED_SEGMENT_SETTING = Setting.byteSizeSetting(
"merge.policy.default.max_merged_segment",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer something like:

Suggested change
"merge.policy.default.max_merged_segment",
"indices.merge.policy.max_merged_segment",

though adding default could also be fine by me: indices.default.merge.policy.max_merged_segment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed 63a93ec to use indices.merge.policy.max_merged_segment

@tlrx tlrx merged commit b8e772e into elastic:main Nov 15, 2023
14 checks passed
@tlrx tlrx deleted the 2023/11/15/node-defaults-for-merge-max-segment-sizes branch November 15, 2023 14:36
@tlrx
Copy link
Member Author

tlrx commented Nov 15, 2023

Thanks Henning!

andreidan pushed a commit to andreidan/elasticsearch that referenced this pull request Nov 22, 2023
… sizes (elastic#102208)

This change introduces 2 static node-level settings that allow to 
override the default values for the maximum merged segment 
sizes in tiered and time-based merge policies.

New default values can be defined like this in elasticsearch.yml:

indices:
  merge:
    policy:
      max_merged_segment: "5gb"
      max_time_based_merged_segment: "25gb"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/Engine Anything around managing Lucene and the Translog in an open shard. >enhancement Team:Distributed Meta label for distributed team v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants