Description
Describe the bug
Currently, during segment merge (both during auto merge and force merge), OpenSearch creates multiple temporary files while merging individual segment components. Once individual components of the segments are merged, IndexWriter
creates a Compound file (*.cfs
) containing all the Lucene components for a segment. At the end, OpenSearch deletes these temporary files.
Now, in case these temporary files consume all the space on the node (because enough amount of space is unavailable for segment merge to go through), segment merge will fail. Also, the files which got created during segment merge do not get cleaned up and it continues to occupy space on the node. This can cause FSHealthService checks to fail for this node, ultimately causing these nodes to be removed from cluster.
Expected behavior
In case Force segment merge fails, OpenSearch should remove the temporary files created during segment merge.
Activity