Skip to content

Re-consider whether _forcemerge should honor max_num_segments over maxMergedSegmentSize #40159

Closed as not planned
@jpountz

Description

@jpountz

Currently _forcemerge chooses to honor max_num_segments over the maximum segment size. So if the maximum segment size is 5GB (default) and you ask a 10GB shard to be force-merged then you will get a 10GB segment. It makes it hard to have a one-size-fits-all policy regarding the value of max_num_segments that should be provided: merging shards of 10GB down to 1 segment is probably fine, merging shards of 300GB down to 1 segment maybe not.

Maybe one way to work around this issue would be to have a configurable maximum segment size for forced merges as well, and to honor the maximum segment size over max_num_segments. For instance say the maximum segment size for forced merges is 50GB then a 300GB shard would more likely be reduced to 6-7 segments.

This would probably be helpful for ILM.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions