Skip to content

Force Merge should check disk space before attempting a merge to a single segmentΒ #31924

@markharwood

Description

@markharwood

We know that a force merge down to a single segment will be roughly a 2x cost of the current index size because it requires the old and new index co-exist on disk (briefly) before swapping over to the new index.
We should introduce a disk space check before attempting such a merge and return an error if the operation is estimated to tip us over the high watermark threshold for allocating shards to the current node.
This would save the heavy cost of attempting an impossible task and prevent the dangerous scenario of running out of disk space.

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